React Flexbox Grid is a powerful tool for creating responsive websites, inspired by the grid system used in Bootstrap.
This grid system divides the screen into 12 columns, allowing you to specify how much width components should take up on mobile devices, tablets, and desktops. The breakpoints for xs
, sm
, md
, lg
, and xl
are set at 576px, 768px, 992px, and 1200px respectively.
To visualize the impact of these breakpoints, simply resize your browser window while visiting https://example.com/react-flexbox-grid/
You can think of this as similar to using media queries:
// xs --- Extra small devices (portrait phones, less than 576px)
// Default in Bootstrap
// sm --- Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// md --- Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// lg --- Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// xl --- Extra large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }