Generic components in Blueprint #5883
-
Environment
QuestionI was wondering about generic layout components in Blueprint. Does blueprint expect users to roll out their own layout components? Or is it me not noticing such components? I have found out that blueprint doesn’t provide a grid system at the variables section(not a good place IMHO), does the same apply to generic components? (The reason why I am using blueprintjs, not other libraries I have included in my comments is because of not only asthetics but also the fact that blueprint exposes all classes, since it allows myself to build components with the same look-and-feel with the components blueprint provides. |
Beta Was this translation helpful? Give feedback.
Replies: 6 comments
-
The question becomes what goals are you trying to achieve with your "Container-esque" components that directly relate to Blueprint? If you were to write a |
Beta Was this translation helpful? Give feedback.
-
@dmackerman Well, I was thinking about something really basic; things like centering elements (with an optional Still, maybe one generic component that centers it’s children with a margin of |
Beta Was this translation helpful? Give feedback.
-
You're right, Blueprint doesn't provide any generic layout components out of the box. There is one container component, |
Beta Was this translation helpful? Give feedback.
-
@adidahiya I’m sorry for asking questions not exactly relevant to blueprint, but do you have some suggestions for a generic flexbox-based lightweight (non-styling) React component library that can be used with blueprint? |
Beta Was this translation helpful? Give feedback.
-
@pcr910303 I am using React Grid System with Blueprint and so far I have not seen any issues. |
Beta Was this translation helpful? Give feedback.
-
@gkanellopoulos Thanks for your suggestions! 👍 |
Beta Was this translation helpful? Give feedback.
You're right, Blueprint doesn't provide any generic layout components out of the box. There is one container component,
Card
, but in general we suggest rolling your own. As suggested in that small "grid system" section of the docs, we mostly just write flex box CSS directly to style our layouts in Blueprint-based applications. For some more advanced layouts we use things like react-mosaic.