Components Layout
Grid
StableTwo-dimensional layout with fixed columns that collapse responsively, or fluid auto-fit tracks.
Use Grid for dashboards, galleries and card collections. Fixed `columns` collapse to two columns on tablets and one on phones. `minChildWidth` instead fits as many columns as there is room for, which suits galleries of unknown size.
Overview
Active signatures
318
Templates
24
Pending deployments
3
import { Box, Grid, Text } from '@bindshq/stance-react';
const Cell = ({ title, value }: { title: string; value: string }) => (
<Box padding={4} background="surface" border radius="lg">
<Text size="xs" tone="muted">
{title}
</Text>
<Text size="xl" weight="semibold" tabular>
{value}
</Text>
</Box>
);
export function Basic() {
return (
<Grid columns={3} gap={4} style={{ width: '100%' }}>
<Cell title="Active signatures" value="318" />
<Cell title="Templates" value="24" />
<Cell title="Pending deployments" value="3" />
</Grid>
);
}Light, dark and high contrast
Every Stance component is designed and tested in all three appearance modes.
Active signatures
318
Templates
24
Pending deployments
3
Active signatures
318
Templates
24
Pending deployments
3
Active signatures
318
Templates
24
Pending deployments
3
Import
import { Grid } from '@bindshq/stance-react';Platforms
Grid has native counterparts. They share Stance tokens and intent, and use each platform’s own controls and conventions. The live previews on this page are the web implementation.
import { Grid } from '@bindshq/stance-react';Playground
Templates
17
Users
34
Deployments
51
Integrations
68
Signatures
85
Errors
102
<Grid />Examples
Fluid columns
Each cell is at least 160px wide; the number of columns follows the container.
Department
Legal
Department
Finance
Department
Sales
Department
Support
Department
People
Department
Marketing
Department
Engineering
import { Box, Grid, Text } from '@bindshq/stance-react';
const Cell = ({ title, value }: { title: string; value: string }) => (
<Box padding={4} background="surface" border radius="lg">
<Text size="xs" tone="muted">
{title}
</Text>
<Text size="xl" weight="semibold" tabular>
{value}
</Text>
</Box>
);
export function Fluid() {
return (
<Grid minChildWidth="160px" gap={3} style={{ width: '100%' }}>
{['Legal', 'Finance', 'Sales', 'Support', 'People', 'Marketing', 'Engineering'].map((d) => (
<Cell key={d} title="Department" value={d} />
))}
</Grid>
);
}Contract details
Signing parties
import { Box, Grid, Text } from '@bindshq/stance-react';
export function TwoColumn() {
return (
<Grid columns={2} gap={6} style={{ width: '100%' }}>
<Box padding={5} background="subtle" radius="lg">
<Text size="sm">Contract details</Text>
</Box>
<Box padding={5} background="subtle" radius="lg">
<Text size="sm">Signing parties</Text>
</Box>
</Grid>
);
}API reference
| Prop | Type | Default | Description |
|---|---|---|---|
as | keyof JSX.IntrinsicElements | 'div' | Element to render. |
columns | 1 | 2 | 3 | 4 | 5 | 6 | 12 | None | Equal columns; collapses responsively. |
minChildWidth | string | None | CSS length; enables fluid auto-fill tracks. |
gap | SpaceKey | 4 | Gap between cells. |
rowGap | SpaceKey | None | Row gap; defaults to gap. |
align | 'start' | 'center' | 'end' | 'stretch' | None | Vertical alignment of cells. |
Accessibility
- Grid is presentational; source order is the reading order on every screen size.
- For tabular data, use Table, not Grid.
Usage guidelines
Do
- Use fluid columns for galleries.
- Keep related cells adjacent in source order.
Don’t
- Use Grid to lay out data that has row/column relationships; use Table.