shadcn Grid/Stack are not responsive (fixed grid-cols-N, no min-w-0)

Open Beginner friendly
#355 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

@sushanshakya77 is already working on this.

Since Sep 29, 2026.

  • #365 by @sushanshakya77 — open

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

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vercel-labs/json-render

All issues in vercel-labs/json-render

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.