interface

BentoGrid

A data-driven bento layout — a CSS grid of glass Surface cards with varying column/row spans. Each cell rises and fades in on the house spring, staggered left-to-right so the grid assembles as one calm cascade. One earned-accent cell max.

$ npx ondajs add bento-grid

BentoGrid

A data-driven bento layout: a CSS grid of glass Surface cards with varying column/row spans, driven entirely by an items array. Each cell rises and fades in on the house spring, staggered left-to-right (4-frame default), so the grid assembles as one calm cascade rather than popping all at once. Cells carry an optional large value, a title, and a caption; the single accent cell earns the rose. Renders a complete, premium bento with zero props.

Props

PropTypeDefaultNotes
itemsBentoItem[]sample 4-card setEach: title, optional value / caption, colSpan (1), rowSpan (1), accent (false).
columnsnumber3Grid column count.
gapnumber20Gap between cells in px.
widthnumber960Overall grid width in px.
paddingnumber28Inner padding of each cell.
delaynumber0Frames before the first cell enters.
staggernumber4Frames between successive cells.
fontSizenumber30Base title size; wins over size.
sizesize roleSemantic role (herocaption); resolves to canvas-aware px.
colorstring#F2F2F4Title color.
captionColorstring#8E8E98Caption color.
accentColorstring#D96B82Earned-accent cell color.
fontFamilystringClash DisplayTitle / value font.
placementregion or {x,y,anchor}Canvas placement.

Usage

TSX
import { Composition } from 'remotion';
import { BentoGrid } from './components/onda/bento-grid/BentoGrid';

const FeatureBento = () => (
  <BentoGrid
    placement="center"
    columns={3}
    items={[
      { title: 'Motion identity', caption: 'One consistent feel.', colSpan: 2 },
      { title: 'Render', value: '4K', accent: true },
      { title: 'Components', value: '40+' },
      { title: 'Spring physics', caption: 'No overshoot.', colSpan: 2 },
    ]}
  />
);

export const BentoComposition = () => (
  <Composition
    id="FeatureBento"
    component={FeatureBento}
    durationInFrames={120}
    fps={30}
    width={1920}
    height={1080}
  />
);