Skip to content

Bento Grid for React

A glassmorphism bento grid for React whose cells run live mini-demos built from real SheenUI components.

npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/bento-grid.json

Everything you need, already moving

Live components, not screenshots. Try them.

Charts that move with your data

Sparklines draw themselves in and morph between periods. Every number counts up.

Toasts that stack

Newest in front, older ones peek out behind. Hover or focus to fan them out.

One-time codes

Auto-advance, paste a whole code, shake on a miss.

Real glass, live

Frost, tint and float the tile and watch the blur react.

Built for teams

Presence, avatars and invites, with springs that feel physical and stay still for anyone who asks for less motion.

  • BentoGrid
  • BentoCell
  • FeatureBento
  • BentoOtpDemo
  • BentoChartDemo
  • +13 more
  • +10 more

Feature bento

The ready-made block. Every cell is interactive: pick a period, hover or focus the toasts to fan them out, type 2468, flip the switches, invite a teammate.

Everything you need, already moving

Live components, not screenshots. Try them.

Charts that move with your data

Sparklines draw themselves in and morph between periods. Every number counts up.

Toasts that stack

Newest in front, older ones peek out behind. Hover or focus to fan them out.

One-time codes

Auto-advance, paste a whole code, shake on a miss.

Real glass, live

Frost, tint and float the tile and watch the blur react.

Built for teams

Presence, avatars and invites, with springs that feel physical and stay still for anyone who asks for less motion.

Files to copy

14 folders · 23 files · 4 packages
From theme/src/
  • blocks/bento-grid.tsx
  • components/avatar/
  • components/badge/
  • components/button/
  • components/charts/{chart-utils.ts, sparkline.tsx}
  • components/glass-card/
  • components/otp-input/
  • components/spinner/
  • components/switch/
  • blocks/bento-grid/
  • hooks/{use-controllable.ts, use-direction.ts, use-intersection.ts, use-latest.ts, use-magnetic.ts, use-media-query.ts, use-preferences.ts}
  • motion/{gate.ts, light-follower.ts, presets.ts, tokens.ts}
  • lib/{cn.ts, field-control-shell.tsx, form.ts, heading.ts, initials.ts, math.ts, motion-props.ts, state-light.tsx, warn-once.ts}
  • styles/
shadcn CLI
npx shadcn@latest add https://lokendra-builds.github.io/sheenui/r/bento-grid.jsonRegistry item: bento-grid. The styles need the Tailwind v4 glass UI setup.
Packages
pnpm add @base-ui/react clsx motion tailwind-merge

Compose your own

BentoGrid lays cells out by its own width (1, 2, then 3 columns); spans shrink with it, so nothing overflows. Put any visual in a cell, built-in demos included.

Revenue at a glance

A count-up total, a change badge and a trend line that redraws for each period.

Open analytics

Passwordless

Sign in with a code. This one is 1357.

Tune the glass

Frost, tint and float.

Your team, live

See who is here and bring in more people.

Any visual

Cells take any content: artwork, a chart, a product shot.

FeatureBento

PropTypeDefaultDescription
titleReactNodeNoneSection heading (ReactNode); leave out for none.
descriptionReactNodeNoneShows text under the heading (ReactNode).
headingLevelHeadingLevelOption2Heading level of title; cell titles are one level below (2 | 3, default 2). "none" renders them all as paragraphs with no heading role (for an example).
labelsPartial<FeatureBentoLabels>defaultFeatureBentoLabelsEvery other string, for translation: labels={{ chartTitle: "…" }}; omitted keys keep the English of defaultFeatureBentoLabels. All 15 keys of FeatureBentoLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer <section>.
FeatureBentoLabels keys and English defaults (15)
Pass any key in labels; the rest keep the defaults of defaultFeatureBentoLabels.
KeyEnglish default
chartTitleCharts that move with your data
chartDescriptionSparklines draw themselves in and morph between periods. Every number counts up.
toastTitleToasts that stack
toastDescriptionNewest in front, older ones peek out behind. Hover or focus to fan them out.
otpTitleOne-time codes
otpDescriptionAuto-advance, paste a whole code, shake on a miss.
switchTitleReal glass, live
switchDescriptionFrost, tint and float the tile and watch the blur react.
avatarTitleBuilt for teams
avatarDescriptionPresence, avatars and invites, with springs that feel physical and stay still for anyone who asks for less motion.
chartnested object: takes the keys of BentoChartLabels; empty here, so its own English defaults apply
toastnested object: takes the keys of BentoToastLabels; empty here, so its own English defaults apply
otpnested object: takes the keys of BentoOtpLabels; empty here, so its own English defaults apply
switchesnested object: takes the keys of BentoSwitchLabels; empty here, so its own English defaults apply
avatarsnested object: takes the keys of BentoAvatarLabels; empty here, so its own English defaults apply

BentoGrid

PropTypeDefaultDescription
children (required)ReactNodeNoneHolds the cells (ReactNode, required): usually BentoCells.
classNamestringNoneClasses for the outer element (the size container).
gridClassNamestringNoneClasses for the grid itself (gap, row height...).

BentoCell

PropTypeDefaultDescription
title (required)ReactNodeNoneSets the cell's heading (ReactNode, required).
descriptionReactNodeNoneShows the text under the heading (ReactNode).
iconReactNodeNoneShows a small icon before the title.
visualReactNodeNoneLive preview or artwork. Mounted the first time the cell scrolls into view.
colSpan2 | 1 | 31Columns spanned on the widest grid (3 columns); spans shrink with the grid.
rowSpan2 | 11Sets how many rows the cell spans from 2 columns up.
orientation"horizontal" | "vertical""vertical""horizontal" puts the text beside the visual once the cell is wide enough.
hrefstringNoneAdds a "learn more" link under the description.
ctastring"Learn more"Text of the link (string, default "Learn more").
indexnumber0Sets the position in the grid: staggers the entrance.
headingLevelHeadingLevelOption3Heading level of the title (1 to 6, default 3), or "none" for a paragraph with no heading role (for an example).
classNamestringNoneAdds extra classes to the glass card (string).
visualClassNamestringNoneAdds extra classes to the visual area.

Demos

PropTypeDefaultDescription
BentoChartDemo{ data?, currency?, locale?, labels? }NoneSparkline with a period picker and a count-up total. data maps a period key ("7d") to { total, change, values }.
BentoToastDemo{ notifications?, labels? }NoneThree toasts arrive on their own, then a button sends more. Hover, focus or tap fans the stack out.
BentoOtpDemo{ code?, labels? }"2468"OTP field that verifies against code and shakes on a miss.
BentoSwitchDemo{ labels? }NoneSwitches that frost, tint and float a glass tile over crisp shapes.
BentoAvatarDemo{ people?, extra?, labels? }NoneAvatar group with presence and an invite button; extra shows a “+N” chip.
useBentoCellVisible() => booleanNoneInside a cell: false while it is off screen, so your own loops can pause.

BentoAvatarDemo props

PropTypeDefaultDescription
peoplestring[]["Maya Chen", "Leo Park", "Ava Singh", "Noah Kim", "Iris Patel", "Omar Haddad"]Names of the people who can join (string[], default: sample names).
extranumber12People beyond the list, shown as "+N" (number, default 12).
labelsPartial<BentoAvatarLabels>defaultBentoAvatarLabelsEvery other string, for translation: labels={{ invite: "…" }}; omitted keys keep the English of defaultBentoAvatarLabels. All 5 keys of BentoAvatarLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element.
BentoAvatarLabels keys and English defaults (5)
Pass any key in labels; the rest keep the defaults of defaultBentoAvatarLabels.
KeyEnglish default
inviteInvite teammate
resetReset
here(names) => names.length <= 2 ? `${names.join(" and ")} ${names.length === 1 ? "is" : "are"} editing` : `${n...
more(n) => `+${n}`
moreLong(n) => `and ${n} more people`

BentoChartDemo props

PropTypeDefaultDescription
dataRecord<string, BentoChartPeriod>defaultChartData (The default per-period series of the chart tile)Figures per period (Record<string, BentoChartPeriod>, default: sample revenue); the keys become the period buttons.
currencystring"USD"Sets the ISO 4217 currency (string, default "USD").
localestring"en-US"Sets the BCP 47 locale (string, default "en-US").
labelsPartial<BentoChartLabels>defaultBentoChartLabelsEvery other string, for translation: labels={{ metric: "…" }}; omitted keys keep the English of defaultBentoChartLabels. All 6 keys of BentoChartLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element.
BentoChartLabels keys and English defaults (6)
Pass any key in labels; the rest keep the defaults of defaultBentoChartLabels.
KeyEnglish default
metricRevenue
periodPeriod
periodShort(key) => key.toUpperCase()
periodName(key) => { const match = /^(\d+)\s*([dwmy])$/i.exec(key); if (!match) return key; const n = Number(match[1]...
change(direction, amount) => `${direction === "up" ? "Up" : "Down"} ${amount}`
trend(metric, period, change) => `${metric} trend, ${period.toLowerCase()}, ${change.toLowerCase()}`

BentoOtpDemo props

PropTypeDefaultDescription
codestring"2468"The code that verifies (string, default "2468"). Its length sets the number of slots.
labelsPartial<BentoOtpLabels>defaultBentoOtpLabelsEvery other string, for translation: labels={{ label: "…" }}; omitted keys keep the English of defaultBentoOtpLabels. All 5 keys of BentoOtpLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element.
BentoOtpLabels keys and English defaults (5)
Pass any key in labels; the rest keep the defaults of defaultBentoOtpLabels.
KeyEnglish default
labelVerification code
hint(c) => `Hint: the code is ${c}`
successVerified. Welcome in.
errorThat code doesn't match.
resetTry again

BentoSwitchDemo props

PropTypeDefaultDescription
labelsPartial<BentoSwitchLabels>defaultBentoSwitchLabelsEvery other string, for translation: labels={{ preview: "…" }}; omitted keys keep the English of defaultBentoSwitchLabels. All 5 keys of BentoSwitchLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element.
BentoSwitchLabels keys and English defaults (5)
Pass any key in labels; the rest keep the defaults of defaultBentoSwitchLabels.
KeyEnglish default
previewGlass preview
frostFrosted glass
tintAccent tint
floatFloat
sampleAa

BentoToastDemo props

PropTypeDefaultDescription
notificationsBentoToast[]defaultToasts (The default notifications of the toast-stack tile)Notifications to cycle through. The first three play on their own when the cell appears.
labelsPartial<BentoToastLabels>defaultBentoToastLabelsEvery other string, for translation: labels={{ region: "…" }}; omitted keys keep the English of defaultBentoToastLabels. All 2 keys of BentoToastLabels are listed in the key table under the props table.
classNamestringNoneAdds extra classes to the outer element.
BentoToastLabels keys and English defaults (2)
Pass any key in labels; the rest keep the defaults of defaultBentoToastLabels.
KeyEnglish default
regionSample notifications
sendSend notification

Keyboard

KeysAction
TabVisit the controls inside each demo cell in reading order; a cell's optional link is the only tab stop the cell itself adds.
SpaceToggle a switch in the switch demo.
0–9/BackspaceType or step back in the OTP demo; “Try again” is a button.

Accessibility

  • BentoGrid is a plain layout <div> with no semantics; each cell carries its own heading and text.
  • The avatar group has a text name and “+N” has a long form for screen readers; changes are announced.
  • The switch demo uses real switches with visible labels.

All exports on this page

  • BentoAvatarDemo — A bento visual: an avatar group where an "Invite teammate" button adds people one by one and a sentence says who is editing.
  • BentoCell — Use it inside a BentoGrid.
  • BentoChartDemo — A bento visual: a revenue total that counts up beside a sparkline, with period buttons that change both.
  • BentoGrid — Props (see BentoGridProps): children (required), className (the size container) and gridClassName (the grid itself: gap, row height).
  • BentoOtpDemo — A bento visual: a working one-time-code field with a hint, a success state and a wrong-code shake.
  • BentoSwitchDemo — A bento visual: three switches (frosted glass, accent tint, float) that change a live glass tile over coloured shapes, so the blur is easy to see.
  • BentoToastDemo — A bento visual: a stack of glass notifications that plays three on its own, spreads on hover or focus, and has a button to send another.
  • FeatureBento — The ready-made feature section: a heading and a BentoGrid of cells, each with a live mini-demo (chart, toasts, OTP, switches, avatars).
  • defaultBentoAvatarLabels — The English strings of the avatar tile; pass labels to override any of them.
  • defaultBentoChartLabels — The English strings of the chart tile; pass labels to override any of them.
  • defaultBentoOtpLabels — The English strings of the one-time-code tile; pass labels to override any of them.
  • defaultBentoSwitchLabels — The English strings of the glass-switch tile; pass labels to override any of them.
  • defaultBentoToastLabels — The English strings of the toast tile; pass labels to override any of them.
  • defaultFeatureBentoLabels — The English strings of FeatureBento; pass labels to override any of them.
  • useBentoCellVisible — True while the surrounding BentoCell is on screen: pause loops and timers when it's false.

When to use the bento grid

  • Use BentoGrid as a glassmorphism bento grid for a landing page feature section, where cells of different sizes show a chart, a notification stack, an OTP field and a switch preview instead of a plain three-column list. Use it as a bento features section in Tailwind on a landing page.
  • Use it for a product overview inside a documentation site, giving big cells colSpan 2 or rowSpan 2 and letting the grid collapse to one column on narrow containers.
  • Use BentoCell with a visual prop to mount heavy demos lazily, since the visual only appears the first time its cell scrolls into view.
  • Skip it when the items are uniform records that people scan or sort, such as team members or invoices; a simple card grid or a data table is clearer than a bento layout.
  • Pair it with Sparkline, Avatar, Badge and Switch inside cells, and with the ready-made BentoChartDemo, BentoToastDemo and BentoOtpDemo visuals when you want a quick start.

Frequently asked questions

20 blocks pages in all: browse them on All blocks.

By Lokendra Singh Rathore (GitHub, opens in a new tab). Published , updated .