Install Keyframery in Vite
Add Keyframery's animated UI SDK components to a Vite and React project with the shadcn CLI: a new project, a preset from Keyframery Create, or an existing app.
Choose the setup that matches your starting point.
Use Keyframery Create
Build your preset
Open Keyframery Create and pick your colours, corners, font and motion. Copy the command under the preview.
Create the project
npx shadcn@latest init -t viteAdd the preset
Run the command you copied from the project's folder:
npx shadcn@latest add @keyframery/preset-<code>It writes the colours, corners and motion into src/index.css. A preset with a font installs it from Fontsource and imports it there too.
Use the CLI
Add components
npx shadcn@latest add @keyframery/tabsThe files land in src/components/keyframery/, and the motion tokens go into src/index.css.
Use it
import { Tabs, TabsList, TabsPanel, TabsPanels, TabsTab } from "@/components/keyframery/tabs"
export default function App() {
return (
<Tabs defaultValue="account">
<TabsList aria-label="Settings">
<TabsTab value="account">Account</TabsTab>
<TabsTab value="password">Password</TabsTab>
</TabsList>
<TabsPanels>
<TabsPanel value="account">Account settings</TabsPanel>
<TabsPanel value="password">Password settings</TabsPanel>
</TabsPanels>
</Tabs>
)
}Existing Project
Check the setup
You need React 19, Tailwind CSS v4 through @tailwindcss/vite, and the @/ alias in tsconfig.json, tsconfig.app.json and vite.config.ts. shadcn's Vite guide walks through each file. Then set up the CLI:
npx shadcn@latest initAdd components
npx shadcn@latest add @keyframery/tabsNotes for Vite
- Strict builds. Every Keyframery file passes the template's
noUnusedLocals,noUnusedParameters,verbatimModuleSyntaxanderasableSyntaxOnlychecks, sotsc -b && vite buildstays green. "use client". The files start with it for frameworks that render on the server. Vite ignores it.- Motion style. Wrap the app in
<KeyframeryProvider motion="calm">insrc/main.tsx, or putdata-motion="calm"on<html>inindex.html.
Questions
Does Vite's default build pass with Keyframery installed?
Yes. The shadcn Vite template builds with tsc -b && vite build and strict unused-variable checks, and every Keyframery file passes them.
How does a preset's font load in Vite?
The CLI installs the font's @fontsource-variable package and imports it at the top of src/index.css, then points --font-sans at it.
Next.js
Add Keyframery's animated UI SDK components to a Next.js App Router project with the shadcn CLI: a new project, a Create preset, or an existing app.
TanStack Start
Add Keyframery's animated UI SDK components to a TanStack Start project with the shadcn CLI: a new project, a preset from Keyframery Create, or an existing app.