Fixes for what most often goes wrong: an unknown registry, a serif font after shadcn init, Next.js stopping on Date.now(), and motion that doesn't play.
Part of Keyframery, the open-source animated components for UI SDK
The CLI says Unknown registry "@keyframery"
Your shadcn CLI didn't find @keyframery in shadcn's registry index. Update the CLI, or register the registry once and install again:
npx shadcn@latest registry add "@keyframery=https://keyframery.com/r/{name}.json"Keep the quotes: some shells expand {name} otherwise.
Text shows in a serif font (Times)
This comes from the project setup, not from Keyframery, which never sets a font. A fresh create-next-app project names its font --font-geist-sans, while shadcn init can write --font-sans: var(--font-sans), which points at nothing. Point it at your font in globals.css:
@theme inline {
--font-sans: var(--font-geist-sans); /* was: var(--font-sans) */
}Next.js stops with "unstable value Date.now()"
With cacheComponents turned on, Next.js won't prerender anything that reads the current time. UI SDK's date components (Calendar, Date Picker and Date Input) read it to know what "today" is, so render them inside <Suspense> after await connection():
import { connection } from "next/server"
import { Suspense } from "react"
import { Calendar } from "@/components/keyframery/calendar"
async function Today() {
await connection() // render on each request, so "today" is today
return <Calendar />
}
export default function Page() {
return (
<Suspense>
<Today />
</Suspense>
)
}This happens with UI SDK's own Calendar too; it is not specific to Keyframery.
Nothing animates
Check these in order:
- Reduced motion. Keyframery stops moving when your operating system asks for reduced motion. On macOS: System Settings, Accessibility, Display, Reduce motion.
- The motion tokens. Your global CSS should contain
--kf-speedand--ease-spring. If it doesn't, run the install command again; the CLI adds them. - The browser. See Browser support.
For UI SDK's own causes (exits on the wrong attribute, the tab indicator's first click, reduced motion that leaves popups open), see UI SDK animations not working.
A button shows two spinners while pending
Keyframery's Button renders its own spinner while pending. If yours already renders one, pass pendingIndicator={null}.
Something else
Open an issue on GitHub with the component name and what you expected.
Browser support
Keyframery's motion is written with modern CSS: linear() easings, @starting-style, anchor positioning and sibling-index(). Here is what each move relies on.
Changelog
What changed in Keyframery, newest first: the 1.0 release for UI SDK, and what happened to the earlier Cuts motion layer.