Widget Grid - React Component | Kokonut UI
Widget Grid
Dashboard widgets you lift, drag and resize on a 6-column grid, with spring physics and full keyboard support.
Installation
Widget Grid is a free, open-source React component in the Kokonut UI Cards collection. Add it with the shadcn CLI, which copies the source into components/kokonutui/bento-grid.tsx, so the code is yours to change.
npx shadcn@latest add @kokonutui/bento-grid
Or add it by hand: install its packages, then copy the source from above into components/kokonutui/bento-grid.tsx.
npm install lucide-react motion
Usage
import WidgetGrid from "@/components/kokonutui/bento-grid";
export default function Example() {
return <WidgetGrid />;
}
Props
items
WidgetGridItem[]Default:demo data
layout
WidgetLayoutItem[]
defaultLayout
WidgetLayoutItem[]
onLayoutChange
(layout: WidgetLayoutItem[]) => void
className
string
rowHeight
numberDefault:176
WidgetGridItem
id(required)stringtitle(required)stringiconReactNoderender(required)(size: WidgetSize) => ReactNodedefaultSpannumberDefault:2
WidgetLayoutItem
id(required)stringspan(required)number
WidgetSize
type WidgetSize = "s" | "m" | "l";
Dependencies
| Needs | Version | Comes from |
|---|---|---|
lucide-react |
^0.556.0 |
npm, installed by the CLI |
motion |
^12.23.25 |
npm, installed by the CLI |
cn from lib/utils.ts |
shadcn init | |
| React | 19 |
Your app |
| Tailwind CSS | 4 |
Your app |
No provider, font or global CSS to set up: the file works as soon as it lands.