BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/ridiculous/grid-builder

Grid Builder

ridiculous/grid-builder
FreeComponent

Ridiculously typed CSS grid-template editor for track lists and grid-template-areas across three modes, with TrackListLiteral validating the full track grammar and GridAreasLiteral checking quoting, equal column counts, and cell idents at the type level. Ships a live display:grid preview and a clickable areas painter.

Install it

npx shadcn@latest add http://ridiculous.turtlesocks.dev/r/grid-builder.json

Source

src/components/ui/grid-builder/grid-builder.tsxridiculous.turtlesocks.dev/r/grid-builder.json
1"use client"
2
3import { useEffect, useMemo, useState } from "react"
4import { Button } from "@/components/ui/button"
5import {
6 Popover,
7 PopoverContent,
8 PopoverTrigger,
9} from "@/components/ui/popover"
10import { cn } from "@/lib/utils"
11import { AreasEditor } from "./areas-editor"
12import { MODES } from "./grid-builder.constants"
13import {
14 formatAreas,
15 formatTracks,
16 parseAreas,
17 parseTracks,
18 type TrackToken,
19} from "./grid-builder.helpers"
20import type { GridMode, GridTemplateString } from "./grid-builder.types"
21import { GridPreview } from "./grid-preview"
22import { TrackListEditor } from "./track-list-editor"
23
24export type { AreasEditorProps, AreasPainterProps } from "./areas-editor"
25// Re-export the sub-component public API so the entry module remains the
26// single import surface (`./grid-builder`) for consumers + tests.
27export { AreasEditor, AreasPainter } from "./areas-editor"
28export type { GridPreviewProps } from "./grid-preview"
29export { GridPreview } from "./grid-preview"
30export type {
31 TrackListEditorProps,
32 TrackTokenRowProps,
33} from "./track-list-editor"
34export { TrackListEditor, TrackTokenRow } from "./track-list-editor"
35
36// ---------------------------------------------------------------------------
37// Shared props
38// ---------------------------------------------------------------------------
39
40export interface GridBuilderPanelProps {
41 value: GridTemplateString | (string & {})
42 onChange: (value: GridTemplateString) => void
43 /**
44 * Which template property the editor targets and the live preview renders.
45 * `columns`/`rows` share the track-list grammar; `areas` is the painter.
46 * This selects the active tab + preview target — it does not change
47 * validation. Defaults to `"columns"`.
48 */
49 mode?: GridMode
50 className?: string
51 "aria-label"?: string
52}
53
54export type GridBuilderProps = GridBuilderPanelProps
55
56// ---------------------------------------------------------------------------
57// GridBuilder — popover-wrapped
58// ---------------------------------------------------------------------------
59
60export function GridBuilder(props: GridBuilderProps) {
61 const {
62 value,
63 className,
64 mode = "columns",
65 "aria-label": ariaLabel = "Edit a CSS grid template",
66 } = props
67
68 return (
69 <Popover>
70 <PopoverTrigger asChild>
71 <Button
72 variant="outline"
73 className={cn("h-9 gap-2 px-3 font-mono", className)}
74 aria-label={ariaLabel}
75 >
76// … truncated

What it pulls in

Other registry items

  • ridiculous-type-kit
  • unit-input
  • button
  • popover
  • input
  • label

Files it writes

  • src/components/ui/grid-builder/index.ts
  • src/components/ui/grid-builder/grid-builder.tsx
  • src/components/ui/grid-builder/grid-builder.types.ts
  • src/components/ui/grid-builder/grid-builder.helpers.ts
  • src/components/ui/grid-builder/areas-editor.tsx
  • src/components/ui/grid-builder/grid-builder.constants.ts
  • src/components/ui/grid-builder/grid-preview.tsx
  • src/components/ui/grid-builder/track-list-editor.tsx

Facts

Registry
ridiculous
Type
registry:ui
Access
Free
Files written
8
Licence
MIT
In the index
at or before 2026-08-02
Last confirmed
yesterday

Go to the source

ridiculous.turtlesocks.dev TurtIeSocks/ridiculous on GitHub Raw registry item This item as JSON

More from ridiculous

All 22 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
All ridiculous componentsallridiculousComponentsFreeno deps
Anchor Position Editoranchor-position-editorridiculousComponentsFreeno deps · 9 files
Background Editorbackground-editorridiculousComponentsFreeno deps · 9 files
Box Shadow Editorbox-shadow-editorridiculousComponentsFreeno deps · 7 files
Calc Editorcalc-editorridiculousComponentsFreeno deps · 4 files
Clip Path Editorclip-path-editorridiculousComponentsFreeno deps · 20 files
Color Functioncolor-functionridiculousComponentsFreeno deps · 10 files
Color Pickercolor-pickerridiculousComponentsFreeno deps · 11 files

Also from Kynth Studios

Built for the same person as BlockDex

SkillWorks

Claude Code skills and plugins, scored

skillworks.kynth.studio

RuleStack

AGENTS.md gallery and agent-config comparison

rulestack.kynth.studio

KitGrade

SaaS starter kits, scored from measured facts

kitgrade.kynth.studio

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex

The studio list

One product, taken apart, once a month

Kynth Studios pulls one shipped product open every month — what it does, what it cost to build, what the pipeline behind it looks like, and what the numbers did. One email a month, nothing in between.

Double opt-in — we send one confirmation link and nothing else until you click it.

BlockDex

Built by

Kynth Studios

the studio behind SkillWorks, RuleStack and KitGrade

part of Toolproof, the measurement layer for AI agent tooling

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

© 2026 BlockDex. A Kynth Studios product. Changelog

BlockDex