Release notes
Read the latest changes.
Place and span an item inside Grid.
GridItem is an optional Grid child wrapper for spanning tracks, applying static placement, and adding utility props.
A direct Grid child needs to span tracks, start at a static line, or receive its own utility styling.
Use an ordinary semantic Grid child when automatic placement is enough, or Grid to define the tracks.
Main content
Sidebar
import { Grid, GridItem, Text } from "@smoothie-framework/whisk-react";
<Grid columns={{ base: 1, md: 3 }} gap={3}>
<GridItem colSpan={{ base: 1, md: 2 }} background="surface2" padding={3}>
<Text>Main content</Text>
</GridItem>
<Text>Sidebar</Text>
</Grid>Use a responsive span when a primary panel should take more tracks on a wider layout. GridItem remains one column wide at the base breakpoint.
Primary workspace
Activity
import { Grid, GridItem, Text } from "@smoothie-framework/whisk-react";
<Grid columns={{ base: 1, md: 4 }} gap={3}>
<GridItem colSpan={{ base: 1, md: 3 }} background="surface2" padding={4} rounded="md">
<Text>Primary workspace</Text>
</GridItem>
<GridItem background="surface1" padding={4} rounded="md">
<Text>Activity</Text>
</GridItem>
</Grid>Use rowSpan for a panel that should occupy more than one row. Give the parent enough items and defined tracks for the placement to be visible.
Summary
Activity
Members
import { Grid, GridItem, Text } from "@smoothie-framework/whisk-react";
<Grid columns={3} rows={2} gap={3}>
<GridItem rowSpan={2} background="surface2" padding={4} rounded="md"><Text>Summary</Text></GridItem>
<GridItem background="surface1" padding={4} rounded="md"><Text>Activity</Text></GridItem>
<GridItem background="surface1" padding={4} rounded="md"><Text>Members</Text></GridItem>
</Grid>Use an explicit start line sparingly. Source order and automatic placement are easier to maintain when they already express the intended layout.
Scheduled report
import { Grid, GridItem, Text } from "@smoothie-framework/whisk-react";
<Grid columns={3} gap={3}>
<GridItem colStart={2} colSpan={2} background="surface2" padding={4} rounded="md">
<Text>Scheduled report</Text>
</GridItem>
</Grid>Use as or asChild when GridItem represents a meaningful element. Placement changes the layout, not the element's semantics.
Read the latest changes.
import { Grid, GridItem, Heading, Stack, Text } from "@smoothie-framework/whisk-react";
<Grid columns={{ base: 1, md: 2 }} gap={3}>
<GridItem as="article" background="surface1" padding={4} rounded="md">
<Stack gap={1}>
<Heading level={4} size="sm">Release notes</Heading>
<Text color="subtle">Read the latest changes.</Text>
</Stack>
</GridItem>
</Grid>GridItem renders a div by default and does not create an ARIA gridcell, list item, or landmark. Use as or asChild to preserve the right HTML semantics. Keep source order meaningful: visual placement must not make the reading or keyboard order confusing.