shadcn Grid/Stack are not responsive (fixed grid-cols-N, no min-w-0)
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- tailwindcss, typescript
- Domain
- frontend
Research direction
Look at the Grid and Stack component implementations in the codebase, likely in a components/ui/ directory. The issue describes the specific lines to modify: the mapping of columns to a static grid-cols-N class and the missing min-w-0 class. Test changes by viewing a generated dashboard on a mobile viewport (~390px) to ensure the layout becomes responsive and content scrolls properly within containers.
Written by the indexing model from the issue text.
Description
Version: @json-render/shadcn 0.21.0
Grid maps columns straight to grid-cols-N, and neither Grid nor Stack sets min-w-0 on themselves:
const n = Math.max(1, Math.min(6, props.columns ?? 1));
const cols = colsMap[n] ?? "grid-cols-1";
Effect on mobile (~390px): a Grid with columns: 4 of Metric cards stays 4 columns wide, so labels and values get crushed or overflow. A wide Table inside a Stack/Grid item pushes the whole page sideways instead of scrolling in its own box, because flex/grid children default to min-width: auto.
LLM-generated specs pick columns for a desktop layout, so this shows up on almost every generated dashboard viewed on a phone.
Suggestion: make columns responsive (e.g. grid-cols-1 sm:grid-cols-2 lg:grid-cols-N) and add min-w-0 to Stack, Grid and their direct children. We currently override both components in our registry to do this.
- Dominant language
- TypeScript
- Stars
- 20k
- Forks
- 1.1k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 25
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from vercel-labs/json-render
-
React Quick Start examples fail at runtime: Renderer must be wrapped in JSONUIProviderPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 1/5 1-3 hours Newbie friendliness 86/100
vercel-labs/json-render#443 ·
Maintainers usually reply within 2 days
-
Array path helpers accept malformed RFC 6902 indexesPossibly taken @simonyang08 claimed this 106 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/json-render#326 ·
Maintainers usually reply within 2 days
-
Support zod 4.4+ — _zod.version.minor type check prevents upgradeMay be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vercel-labs/json-render#297 · 2 reactions ·
Maintainers usually reply within 2 days
-
feat: Generic `Spec` type supportPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vercel-labs/json-render#275 · 1 reaction ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vercel-labs/json-render#260 · 6 reactions ·
Maintainers usually reply within 2 days
All issues in vercel-labs/json-render
Similar issues
-
bug data-types
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/clickhouse-js#1293 ·
Maintainers usually reply within 1 day
-
area: middleware enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
agent/quality testing
Difficulty 1/5 Under an hour Newbie friendliness 95/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
juspay/agent-distro#203 ·
Maintainers usually reply within 1 day