BentoBox

The BentoBox component creates responsive editorial grids with items that can span multiple columns and rows.

Usage & Examples

Dashboard Bento Grid

RevenueA wide, tall feature tile.
Conversion8.4% this month
Orders1,248
Returns2.1%
dashboard-bento-grid.tsx
const tileStyle = {
  boxSizing: "border-box",
  display: "flex",
  flexDirection: "column",
  justifyContent: "center",
  width: "100%",
  height: "100%",
  minHeight: "4.5rem",
  padding: "1rem",
  border: "1px solid var(--border-color)",
  borderRadius: "var(--border-radius-md, 0.75rem)",
  background: "var(--background-color-surface)",
};

<BentoBox columns={4} minRowHeight="5rem" gap="sm">
  <BentoBoxItem columnSpan={2} rowSpan={2}>
    <div style={tileStyle}><strong>Revenue</strong><span>A wide, tall feature tile.</span></div>
  </BentoBoxItem>
  <BentoBoxItem columnSpan={2}>
    <div style={tileStyle}><strong>Conversion</strong><span>8.4% this month</span></div>
  </BentoBoxItem>
  <BentoBoxItem>
    <div style={tileStyle}><strong>Orders</strong><span>1,248</span></div>
  </BentoBoxItem>
  <BentoBoxItem>
    <div style={tileStyle}><strong>Returns</strong><span>2.1%</span></div>
  </BentoBoxItem>
</BentoBox>

Props API

19 props
Columns
BentoBox props API
Default
Description
BentoBox.alignLayoutAlignNoprops—Align prop for LayoutPrimitive.
BentoBox.asElementTypeNoprops—As prop for LayoutPrimitive.
BentoBox.childrenReactNodeNoprops—Content rendered inside the component.
BentoBox.classNamestringNostyling—Additional CSS class names for the component root.
BentoBox.columnsBentoBoxColumnsNoprops4Number of columns at wide container sizes.
BentoBox.data-testidstringNotesting—Test id used to identify the component in tests.
BentoBox.densebooleanNopropsfalseBackfills open cells when possible. Keep this off when visual order must match reading and focus order.
BentoBox.gapLayoutGapNoprops"md"Gap.
BentoBox.gridClassNamestringNoprops—Additional class name for the internal grid.
BentoBox.justifyLayoutJustifyNoprops—Justify prop for LayoutPrimitive.
BentoBox.minRowHeightstringNoprops"8rem"Minimum height used by each implicit grid row.
BentoBox.testIdstringNoprops—Test id used to identify the component in tests.