Componentdata0.5 KB gzipZero dependencies

Bento Grid

Bento grid: variable-sized cells with hover lift and staggered entrance.

Preview

Live Preview
Open ↗

Installation

Tokens guide →

Add to your project via CLI (zero dependencies, code you own):

npx bigbullui add bento-grid

Or install the full npm package:

npm install bigbullui

Usage

tsx3 lines
import { BentoGrid } from "@/components/ui/bento-grid"; <BentoGrid />

Source code

bento-grid.tsx + 1 helper

Zero 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

PropTypeDescription
cellsBentoCell[]Configures cells. (Default: [])
columns2 | 3 | 4Column definitions describing headers, cell keys, and sorting. (Default: 4)