SimpleGrid
A grid of equal columns, set by a column count or a minimum width.
Usage
import { SimpleGrid } from '@leverui/components';
<SimpleGrid>
<Box />
<Box />
</SimpleGrid>
Examples
Columns
Specify the number of columns for the grid layout using the columns prop.
Auto-responsive
Make the grid responsive and adjust automatically without passing columns, by using the minChildWidth prop. This uses css grid auto-fit and minmax() internally.
Column Span
Specify the size of the column by using the colSpan prop.
Row and Column Gap
Set the row-gap and column-gap CSS properties to change the row and column spacing between the grid items.
Guides
Equal-width columns, set with columns or minChildWidth. Takes the same
layout aliases and HTML props as Grid. Import the
Lever UI stylesheet once.
columns is the number of columns. Responsive. minChildWidth="16rem" gives
auto-fit columns that wrap as space runs out, and overrides columns. A
number is read as pixels. A named size token is looked up through the public
CSS variables. To span columns or rows, use GridItem from Grid.
No gap, rowGap, or columnGap style props. Set those CSS properties with a
class or the style attribute.
Grid placement can change the visual order without changing the HTML order. Keep the HTML order sensible, because keyboards and screen readers follow it.