Guides

Installation

Three commands in any project that uses shadcn — Next.js, Vite, React Router, Astro, TanStack Start.

1

Set up shadcn

If the project doesn’t have a components.json yet:

pnpm dlx shadcn@latest init
2

Add the foundation and a palette

glass-style brings the tokens, the glass utilities and the keyframes. A palette sets the accent, ring, ground and chart colours. theme-system is Apple’s default appearance; twelve coloured palettes add an aurora.

pnpm dlx shadcn@latest add https://glasscn.app/r/glass-style.json https://glasscn.app/r/glass-effects.json https://glasscn.app/r/theme-system.json
3

Add components

Each pulls in what it needs (the foundation, helpers, Radix) automatically.

pnpm dlx shadcn@latest add https://glasscn.app/r/card.json https://glasscn.app/r/button.json
4

Add a ground and the glass runtime

Put photos, an article or a list behind floating controls. The page ground is --aurora-base; add aurora if you pick a coloured palette. GlassEffects enhances control surfaces and newly opened portals on Chromium; other engines keep the CSS material. LiquidGlass installs the shared runtime automatically.

app/layout.tsx
import { GlassEffects } from "@/components/glass/glass-effects"

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body className="bg-(--aurora-base)">
        <GlassEffects />
        {children}
      </body>
    </html>
  )
}

Use the @glasscn-app namespace

Add the registry to components.json once and install by name:

components.json
{
  "registries": {
    "@glasscn-app": "https://glasscn.app/r/{name}.json"
  }
}
pnpm dlx shadcn@latest add @glasscn-app/button @glasscn-app/dock @glasscn-app/activity-rings

Where files go

Components install to components/glass/* (beside shadcn’s components/ui, never over it), blocks to components/glass-blocks/*, helpers to lib/ and hooks/. Imports follow your components.json aliases. Class merging uses the foundation’s glass-cn helper, which teaches cn the named radius and spacing tokens.