gridland
Guides

Installing Components

How to install individual @gridland/ui components using the shadcn CLI

Gridland UI components are distributed via a shadcn registry. Components are copied into your project so you own the code and can customize it freely.

Projects created with create-gridland already have shadcn configured — skip to Step 2.

Configure shadcn

Create a components.json file in your project root with the Gridland registry:

components.json
{
  "$schema": "https://ui.shadcn.com/schema.json",
  "style": "new-york",
  "rsc": false,
  "tsx": true,
  "tailwind": {
    "config": "",
    "css": "",
    "baseColor": "neutral",
    "cssVariables": false
  },
  "aliases": {
    "components": "@/components",
    "ui": "@/components/ui",
    "utils": "@/lib/utils"
  },
  "registries": {
    "@gridland": "https://gridland.io/r/{name}.json"
  }
}

Set "rsc": true if you're using Next.js with React Server Components.

Make sure your tsconfig.json has a @/* path alias configured (e.g. "@/*": ["./src/*"] for Vite or "@/*": ["./*"] for Next.js).

Add components

Install components from the Gridland registry:

Terminal
bunx shadcn@latest add @gridland/<component-name>
Terminal
npx shadcn@latest add @gridland/<component-name>
Terminal
yarn dlx shadcn@latest add @gridland/<component-name>
Terminal
pnpm dlx shadcn@latest add @gridland/<component-name>

For example, to install the Spinner component:

bunx shadcn@latest add @gridland/spinner

Components that depend on shared utilities (like theme or text-style) will automatically install those dependencies alongside the component.

Available components

ComponentRegistry name
Asciiascii
Chatchat
Gradientgradient
Linklink
Messagemessage
Modalmodal
Multi Selectmulti-select
Prompt Inputprompt-input
Select Inputselect-input
Spinnerspinner
Status Barstatus-bar
Tab Bartab-bar
Tabletable
Terminal Windowterminal-window
Text Inputtext-input
Chain of Thoughtchain-of-thought

Shared utilities

These are installed automatically when needed by a component:

UtilityRegistry nameDescription
ThemethemeTheme context, provider, and built-in dark/light themes
Text Styletext-styleHelper to convert text decoration flags to opentui style objects
ProviderproviderGridlandProvider root component with theme and keyboard context
BreakpointsbreakpointsResponsive breakpoints hook using terminal dimensions