Install Keyframery in Laravel
Add Keyframery's animated UI SDK components to a Laravel app with the React starter kit and Inertia: a preset from Keyframery Create, or the shadcn CLI.
The shadcn CLI doesn't scaffold a Laravel app. Create one with the React starter kit first, then add Keyframery.
Create the project
laravel new my-appChoose the React starter kit when asked. It sets up Inertia, Tailwind CSS v4 and a components.json. If you already have a Laravel app with React and Inertia, skip this step.
cd my-appUse Keyframery Create
Build your preset
Open Keyframery Create and pick your colours, corners, font and motion. Copy the command under the preview.
Add the preset
Run the command you copied from the app's folder:
npx shadcn@latest add @keyframery/preset-<code>It writes the colours, corners and motion into resources/css/app.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 resources/js/components/keyframery/, and the motion tokens go into resources/css/app.css.
Use it
import { Head } from "@inertiajs/react"
import { Tabs, TabsList, TabsPanel, TabsPanels, TabsTab } from "@/components/keyframery/tabs"
export default function Welcome() {
return (
<>
<Head title="Settings" />
<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>
</>
)
}Run it
composer run devNotes for Laravel
- Where files go. The CLI follows the starter kit's
components.json, so components land next to its own inresources/js/components/, and@/resolves toresources/js/. - Reformatting. The starter kit's setup can reformat every file under
resources/js/when Composer updates. Keyframery's files keep type-checking after that. - Motion style. Wrap the Inertia app in
<KeyframeryProvider motion="calm">inresources/js/app.tsx, or putdata-motion="calm"on<html>inresources/views/app.blade.php.
Questions
Does Keyframery work with Laravel's React starter kit?
Yes. The starter kit already has Tailwind CSS v4, the @/ alias and a components.json, so the shadcn CLI installs Keyframery into resources/js/components/keyframery/ with nothing else to set up.
Do I need PHP to install the components?
No. The shadcn CLI runs with Node. You need PHP to run the app, as any Laravel app does.
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.
React Router
Add Keyframery's animated UI SDK components to a React Router framework-mode app with the shadcn CLI: a new project, a Create preset, or an existing app.