Getting started

Installation.

Layout Kit ships as a shadcn registry. Three steps from an existing shadcn project to a well-composed interface.

shadcn registryTailwind CSS 4React 19

Step 01

Register the namespace

Add the Layout Kit registry to the components.json of any project that already runs shadcn. The namespace lets the CLI resolve items and their dependencies from this site.

components.json
{
  "registries": {
    "@layout-kit": "https://layout.csikie.com/r/{name}.json"
  }
}

Step 02

Add the primitives

Install everything with the layout bundle, or pick individual items. The CLI copies the source into your ui and lib folders and rewrites imports to your aliases.

Terminal
# Everything: Stack, Row, Col, Grid, GridItem, Page
npx shadcn@latest add @layout-kit/layout

# Or only what you need
npx shadcn@latest add @layout-kit/page @layout-kit/grid

Step 03

Compose your first layout

Import from the files the CLI created and place shadcn components inside them. Tailwind picks the classes up from your own source tree, so there is nothing else to configure.

app/page.tsx
import { Row } from "@/components/ui/row";
import { Stack } from "@/components/ui/stack";
import { Button } from "@/components/ui/button";

export default function Page() {
  return (
    <Stack gap={6}>
      <h1 className="text-2xl font-semibold tracking-tight">Your next idea</h1>
      <Row gap={2} wrap>
        <Button>Get started</Button>
        <Button variant="outline">Learn more</Button>
      </Row>
    </Stack>
  );
}

Reference

Registry items

Every item is published from this site. The raw JSON for each one lives at the URL pattern configured above.

PropTypeDefault
@layout-kit/layout-spacing

Shared layout vocabulary: gap, align, and justify scales, breakpoints, and the Responsive<T> helper.

registry:lib—
@layout-kit/stack

Vertical flex container with responsive gap, align, and justify.

registry:ui—
@layout-kit/row

Horizontal flex container with responsive gap, align, and justify, plus wrapping.

registry:ui—
@layout-kit/col

Flex child with explicit grow, shrink, and self-alignment.

registry:ui—
@layout-kit/grid

CSS grid with responsive column count, gap, and alignment.

registry:ui—
@layout-kit/grid-item

Responsive column span inside a Grid.

registry:ui—
@layout-kit/page

Page frame with header, actions, body, and an optional aside on either side.

registry:ui—
@layout-kit/layout

Every layout primitive: Stack, Row, Col, Grid, GridItem, and Page.

bundle—

Environment

Requirements

  • An existing shadcn setup with a components.json and a cn helper in your utils alias.
  • Tailwind CSS 4. The primitives are plain utility classes and need no plugin or preset.
  • React 19.3 or compatible. The primitives use the React 19 ref-as-prop model.