Install animated components with the shadcn CLI
Every Framekit component installs with one command: npx shadcn@latest add https://www.framekitui.live/r/<slug>.json. You need React 19, Tailwind CSS v4.1+ and a shadcn components.json; the CLI copies the source into your repo and installs what it imports. On the Next.js App Router, add "use client" to the installed file.
Updated · 3 min read
Requirements
A React 19 project on Tailwind CSS v4.1 or newer, with a shadcn components.json and an @/* import alias. The CLI installs everything else per component.
| Package | Version | Installed by |
|---|---|---|
| react, react-dom | 19.x | You |
| tailwindcss | v4.1+ | You |
| motion | latest | shadcn CLI |
| lucide-react | latest | shadcn CLI, for components with icons |
| clsx, tailwind-merge | latest | shadcn CLI, for lib/cn.ts |
No components.json yet? Run init once:
npx shadcn@latest initAdd a component
Run npx shadcn@latest add https://www.framekitui.live/r/<slug>.json from the project root. Every component page has the exact command, with tabs for npm, pnpm, yarn and bun.
For the Glass App Dock:
npx shadcn@latest add https://www.framekitui.live/r/glass-app-dock.jsonThat writes components/ui/glass-app-dock.tsx plus lib/cn.ts and lib/use-reduced-motion.ts, installs motion and lucide-react, and merges the Framekit theme tokens into your CSS.
Every component renders with zero props. The export is the slug in PascalCase:
Import and render
import { GlassAppDock } from '@/components/ui/glass-app-dock'
export function Footer() {
return <GlassAppDock />
}Note: Headline components use font-display (Instrument Serif). Load it, or point --font-display at a font you already ship.
Install by name
Register the @framekit namespace in components.json once, then install by name, several at a time if you like. It also unlocks shadcn search and shadcn view for the whole catalogue.
components.json
{
"registries": {
"@framekit": "https://www.framekitui.live/r/{name}.json"
}
}npx shadcn@latest add @framekit/glass-app-dock @framekit/magnetic-buttonSearch and preview
npx shadcn@latest search @framekit -q dock
npx shadcn@latest view @framekit/magnetic-buttonThe full index lives at /r/registry.json.
Next.js App Router
The components use hooks and browser APIs, and the files don’t ship a "use client" directive. Add it as the first line of each installed component, and Server Component pages can render it as usual.
components/ui/glass-app-dock.tsx
'use client'
import * as React from 'react'
import { motion } from 'motion/react'
// …rest of the file unchangedWithout it, next build fails on lib/use-reduced-motion.ts, the first hook it meets. Marking the component file is enough; what it imports becomes client code too.
Without the CLI
Install the packages, add the shared helpers and theme tokens, then paste the source from the component’s Code tab into components/ui/<slug>.tsx.
npm install motion clsx tailwind-merge lucide-reactEvery component needs lib/cn.ts; animated ones also import lib/use-reduced-motion.ts. Both are on the Installation page. The @theme tokens and the dark variant are on Theming.
Troubleshooting
Most failed installs come down to a missing "use client", a missing @/* alias or a project still on Tailwind v3.
| Symptom | Fix |
|---|---|
“needs useState… only works in a Client Component” | Add "use client" to the component file. |
Cannot find module '@/lib/cn' | Add "@/*" to paths in tsconfig.json and your bundler. |
bg-signal-600 renders nothing | Tokens weren’t merged. Check Tailwind v4.1+ and the CSS path in components.json, or paste them from Theming. |
The CLI asks to overwrite button.tsx | Core items share names with shadcn/ui. Pass --path to install elsewhere. |
dark: styles never switch | Use the class-based variant from Theming. |
| Nothing animates | Reduce motion is on in your OS. That’s intended. |
FAQ
Is Framekit UI an npm package?
No. The CLI copies the source into your repo, so you own the file and can change anything.
Will it work with React 18 or Tailwind v3?
React 19 only; 18 isn’t tested. Tailwind v3 won’t work, because the classes and @theme tokens are v4 syntax.
Can I use it without TypeScript?
Yes. Set "tsx": false in components.json and the CLI converts each file to JavaScript.
How do I update a component later?
Run the same add command with --diff to see what changed, then --overwrite to take it. Commit first; local edits get replaced.
Components in this guide
- Glass App Dock
A macOS-style dock: icons magnify on a spring with a cosine falloff around the pointer, labels float above, launching bounces the icon and lights a running dot. Keyboard focus magnifies too.
- Magnetic Button
Button that magnetically follows the cursor; the label leans a little further for parallax, with a spring press state. Solid, accent and glass surfaces.
- Spotlight Command Palette
A cmdk-style ⌘K launcher: fuzzy grouped results, a highlight that springs between rows, nested pages (Backspace to go back), key-cap hints and full combobox semantics with focus restore.
- Pricing Plans
Three-tier pricing with a sliding monthly/yearly switch whose numerals roll digit by digit, a highlighted ink plan with a light rim, and a “you save” chip that springs in on yearly.