Bento Window
Glass window row for bento layouts and hero art: slices one painting across several framed panes, with helpers for offsets and mullion seams, caption parts and an optional slow pan that stops under reduced motion.
The source comes with full access.
One payment of $149 opens the source right here and lets the CLI install every paid component, with lifetime updates.
Installation
pnpm dlx shadcn@latest add @01orbital/bento-windownpx shadcn@latest add @01orbital/bento-windowyarn dlx shadcn@latest add @01orbital/bento-windowbunx --bun shadcn@latest add @01orbital/bento-windowUsage
import {
GlassWindow,
GlassWindowArt,
GlassWindowRow,
WindowCaption,
WindowEyebrow,
WindowTitle,
} from "@/components/card/bento-window"
import { OrbitalLimbScene } from "@/components/scene/orbital-limb-scene"
// Every word on the page. Change copy here, not in the markup.
const COPY = {
eyebrow: "Capture",
title: "Every channel, one queue",
eyebrow2: "Inbox agent",
title2: "Night shift covered",
} as const
const orb = { limbX: 50, x: 12, size: 116 } as const
// Two windows on one row: the same sky continues behind the wall between them.
export default function BentoWindowDemo() {
return (
<GlassWindowRow tracks={[1, 1]} className="w-full max-w-4xl">
<GlassWindow className="h-85">
<GlassWindowArt offset={0} width={896}>
<OrbitalLimbScene horizon={58} orb={orb} light={{ key: "dual" }} />
</GlassWindowArt>
<WindowCaption>
<WindowEyebrow>{COPY.eyebrow}</WindowEyebrow>
<WindowTitle>{COPY.title}</WindowTitle>
</WindowCaption>
</GlassWindow>
<GlassWindow className="h-85">
<GlassWindowArt offset={450} width={896}>
<OrbitalLimbScene horizon={58} orb={orb} light={{ key: "dual" }} />
</GlassWindowArt>
<WindowCaption>
<WindowEyebrow>{COPY.eyebrow2}</WindowEyebrow>
<WindowTitle>{COPY.title2}</WindowTitle>
</WindowCaption>
</GlassWindow>
</GlassWindowRow>
)
}This example installs with everything it uses:
pnpm dlx shadcn@latest add @01orbital/bento-window-demonpx shadcn@latest add @01orbital/bento-window-demoyarn dlx shadcn@latest add @01orbital/bento-window-demobunx --bun shadcn@latest add @01orbital/bento-window-demoAnatomy
Bento Window is built from 7 parts. In the example they nest like this:
GlassWindowRow
└─ GlassWindow
├─ GlassWindowArt
└─ WindowCaption
├─ WindowEyebrow
└─ WindowTitleGlassWindowRow: The row that holds theGlassWindows. The windows stack in one column on small screens and sit side by side from themdbreakpoint, 2px apart.GlassWindow: One window onto the shared painting. It clips aGlassWindowArtand aWindowCaptionto its rounded corners and draws a faint inset ring on top of them as its frame. Text inside uses the scene foreground color.GlassWindowArt: The painting behind oneGlassWindow. It renders the full scene atwidthand shifts it left byoffset, so a row of windows reads as slices of one picture. Put the same art in every window.WindowCaption: The text over aGlassWindow, placed 32px in from the sides and from the top or bottom edge. Put aWindowEyebrow,WindowTitleandWindowBodyinside.WindowEyebrow: A small semibold label above aWindowTitle, with a soft text shadow so it stays readable over the art.WindowTitle: The heading of aWindowCaption, anh3in the body font. Passrenderto use another heading level.WindowBody: Supporting text under aWindowTitle. It uses the text color at 85% rather than a muted tone, so it stays readable over a bright horizon in the art.
API reference
GlassWindowRow
The row that holds the GlassWindows. The windows stack in one column on small screens and sit side by side from the md breakpoint, 2px apart.
The row is a container, so a painting sized by bentoWindows spans the whole row. Its 2px gap matches the default gap of bentoWindows.
Prop
Type
It also accepts the HTML attributes of the element it renders.
GlassWindow
One window onto the shared painting. It clips a GlassWindowArt and a WindowCaption to its rounded corners and draws a faint inset ring on top of them as its frame. Text inside uses the scene foreground color.
Its contents are placed absolutely and give it no height, so set one with className.
It accepts the HTML attributes of the element it renders.
GlassWindowArt
The painting behind one GlassWindow. It renders the full scene at width and shifts it left by offset, so a row of windows reads as slices of one picture. Put the same art in every window.
The shift applies from the md breakpoint, where the windows sit side by side; below it, each window shows the painting's left edge.
Prop
Type
It also accepts the HTML attributes of the element it renders.
WindowCaption
The text over a GlassWindow, placed 32px in from the sides and from the top or bottom edge. Put a WindowEyebrow, WindowTitle and WindowBody inside.
Prop
Type
It also accepts the HTML attributes of the element it renders.
WindowEyebrow
A small semibold label above a WindowTitle, with a soft text shadow so it stays readable over the art.
It accepts the HTML attributes of the element it renders.
WindowTitle
The heading of a WindowCaption, an h3 in the body font. Pass render to use another heading level.
It accepts the props of the Base UI part it wraps, and the HTML attributes of the element it renders.
WindowBody
Supporting text under a WindowTitle. It uses the text color at 85% rather than a muted tone, so it stays readable over a bright horizon in the art.
It accepts the HTML attributes of the element it renders.
Dependencies
npm: @base-ui/react, cn. The CLI installs them for you.
Used in blocks
6 blocks are built with Bento Window:
Dark Not Found with Portholes
Glass & Solid Cell Bento
Porthole Window Bento
Three-Window Glass Bento
Twilight Portholes
Underwater Fish School Bento
Last updated on