BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/dnd-grid/responsive-example

Responsive layout

dnd-grid/responsive-example
FreeComponent

Breakpoint layouts based on container width.

Install it

npx shadcn@latest add https://dnd-grid.com/r/responsive-example.json

Source

examples/dnd-grid-responsive-example.tsxdnd-grid.com/r/responsive-example.json
1"use client";
2
3import { ResponsiveDndGrid, type ResponsiveLayouts } from "@dnd-grid/react";
4
5const layouts: ResponsiveLayouts = {
6 lg: [
7 { id: "a", x: 0, y: 0, w: 6, h: 2 },
8 { id: "b", x: 6, y: 0, w: 3, h: 2 },
9 { id: "c", x: 9, y: 0, w: 3, h: 2 },
10 { id: "d", x: 0, y: 2, w: 12, h: 2 },
11 ],
12 sm: [
13 { id: "a", x: 0, y: 0, w: 4, h: 2 },
14 { id: "b", x: 0, y: 2, w: 4, h: 2 },
15 { id: "c", x: 0, y: 4, w: 4, h: 2 },
16 { id: "d", x: 0, y: 6, w: 4, h: 2 },
17 ],
18};
19
20const cards = ["a", "b", "c", "d"];
21
22export function ResponsiveExample() {
23 return (
24 <ResponsiveDndGrid
25 containerPadding={{ lg: 16, sm: 12 }}
26 gap={{ lg: 16, sm: 12 }}
27 layouts={layouts}
28 rowHeight={48}
29 >
30 {cards.map((id) => (
31 <div key={id}>{id}</div>
32 ))}
33 </ResponsiveDndGrid>
34 );
35}

What it pulls in

npm packages

  • @dnd-grid/react
  • react-draggable
  • react-resizable

Files it writes

  • examples/dnd-grid-responsive-example.tsx

Facts

Registry
dnd-grid
Type
registry:component
Access
Free
Files written
1
Licence
MIT
First indexed
2026-08-03
Last confirmed
yesterday

Go to the source

dnd-grid.com mblode/dnd-grid on GitHub Raw registry item This item as JSON

More from dnd-grid

All 19 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Allow overlapallow-overlap-examplednd-gridComponentsFree3 deps
Aspect ratio constraintsaspect-ratio-constraints-examplednd-gridComponentsFree3 deps
Basic examplebasic-examplednd-gridComponentsFree3 deps
Boundedbounded-examplednd-gridComponentsFree3 deps
Compactor showcasecompactor-showcase-examplednd-gridComponentsFree3 deps
Compositioncomposition-examplednd-gridComponentsFree3 deps
Constraintsconstraints-examplednd-gridComponentsFree3 deps
Drag from outsidedrag-from-outside-examplednd-gridComponentsFree3 deps
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex