Installation/Laravel
Install Default File UI in Laravel with Inertia and React.
Design your setup in a live studio. Laravel is configured in place after you create the Inertia + React app.
Open Create for LaravelCreate the app first, then configure Default File UI in place.
The CLI does not scaffold PHP apps. Create Laravel first, then configure in place.
Create a Laravel + Inertia React app
123laravel new example-appcd example-appphp artisan inertia:install react
Configure with the CLI (npm)
1npx --yes -p @default-file/ui df-ui init --framework laravel
Copy the Button source into your app and import from `@/default-file-ui/components/df-button`. Those files become yours. Later kit releases do not replace them unless you run `df-ui add button --force`. To use the package instead, skip this step and import from `@default-file/ui`.
Add a component (npm)
1npx --yes -p @default-file/ui df-ui add button
Use a component
12345import { Button } from "@default-file/ui/components/df-button"export default function Welcome() {return <Button>Click me</Button>}
Configure with the CLI in your app folder, or follow the manual steps.
Default File UI is React. Use Inertia's React starter (or an equivalent React front end). Skip if you already have one.
Create a Laravel app with React
123laravel new example-appcd example-appphp artisan inertia:install react
Configure with the CLI (npm)
1npx --yes -p @default-file/ui df-ui init --framework laravel
Or install manually (npm)
1npm install @default-file/ui react react-dom lucide-react
Import once in your Vite entry CSS (commonly `resources/css/app.css`). Keep this import first in the file. Starter templates often declare their own `--background`, `--foreground`, or `--border` under `:root`. Those names are kit semantic tokens, so remove or rename them to keep kit theming and dark mode intact.
Import the stylesheet
1@import "@default-file/ui/css/df-index.css";
Copy the Button source into your app and import from `@/default-file-ui/components/df-button`. Those files become yours. Later kit releases do not replace them unless you run `df-ui add button --force`. To use the package instead, skip this step and import from `@default-file/ui`.
Add a component (npm)
1npx --yes -p @default-file/ui df-ui add button
Use a component
12345import { Button } from "@default-file/ui/components/df-button"export default function Welcome() {return <Button>Click me</Button>}
Using a different stack? Choose another framework.