Componentdata0.5 KB gzipZero dependencies
Bento Grid
Bento grid: variable-sized cells with hover lift and staggered entrance.
Preview
Live Preview
Installation
Tokens guide →Add to your project via CLI (zero dependencies, code you own):
npx bigbullui add bento-gridOr install the full npm package:
npm install bigbulluiUsage
tsx3 lines
import { BentoGrid } from "@/components/ui/bento-grid"; <BentoGrid />Source code
bento-grid.tsx + 1 helperZero third-party dependencies (2 local files shown in tabs below).
tsxbento-grid.tsx46 lines
"use client"; import * as React from "react";import { cn } from "./lib/utils"; export interface BentoCell { id: string; /** Grid column span (1-4) */ span?: 1 | 2 | 3 | 4; /** Grid row span (1-3) */ rows?: 1 | 2 | 3; content: React.ReactNode;} export interface BentoGridProps extends React.HTMLAttributes<HTMLDivElement> { cells: BentoCell[]; columns?: 2 | 3 | 4;}Props
| Prop | Type | Description |
|---|---|---|
| cells | BentoCell[] | Configures cells. (Default: []) |
| columns | 2 | 3 | 4 | Column definitions describing headers, cell keys, and sorting. (Default: 4) |