Keyframery

Install Keyframery in 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.

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 start

Add 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/styles.css. A preset with a font installs it from Fontsource and imports it there too.

Add components

npx shadcn@latest add @keyframery/tabs

Then use it in a route.

Use the CLI

Create the project

npx shadcn@latest init -t start

For a project inside a monorepo, add --monorepo.

Add components

npx shadcn@latest add @keyframery/tabs

The files land in src/components/keyframery/, and the motion tokens go into src/styles.css.

Use it

src/routes/index.tsx
import { createFileRoute } from "@tanstack/react-router"

import { Tabs, TabsList, TabsPanel, TabsPanels, TabsTab } from "@/components/keyframery/tabs"

export const Route = createFileRoute("/")({ component: App })

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 and the @/* alias. Apps made with npx @tanstack/cli@latest create already have both. Then set up the CLI:

npx shadcn@latest init

Add components

npx shadcn@latest add @keyframery/tabs

Notes for TanStack Start

  • Server rendering. The components render on the server and start animating once the page hydrates.
  • Motion style. Put data-motion="calm" on <html> in src/routes/__root.tsx, or wrap the route tree in <KeyframeryProvider motion="calm">.

Questions

Do the components work with TanStack Start's server rendering?

Yes. They render on the server and start animating once the page hydrates, with no hydration warnings.

Where do the files go?

Into src/components/keyframery/, with the shared motion helpers in src/lib/keyframery.tsx and the motion tokens in src/styles.css.

On this page