InstallationLaravel

Laravel

Install Default File UI in Laravel with Inertia and React.

Use the CLI

Scaffold a new project with Default File UI already configured.

  1. 01

    Create a Laravel + Inertia React app

    The Default File UI CLI does not scaffold PHP apps. Create Laravel first, then init.

    laravel new example-app
    cd example-app
    php artisan inertia:install react
  2. 02

    Run init in the project

    npx --yes -p github:itsvigneshv/default-file-ui#main df-ui init --framework laravel
  3. 03

    Use a component

    import { Button } from "@default-file/ui/components/df-button"
    
    export default function Welcome() {
      return <Button>Click me</Button>
    }

Existing project

Prefer the CLI init in your app folder, or follow the manual steps.

  1. 01

    Create a Laravel app with React

    Default File UI is React. Use Inertia’s React starter (or an equivalent React front end). Skip if you already have one.

    laravel new example-app
    cd example-app
    php artisan inertia:install react
  2. 02

    Run init in the project

    npx --yes -p github:itsvigneshv/default-file-ui#main df-ui init --framework laravel
  3. 03

    Or install manually

    npm install github:itsvigneshv/default-file-ui#main react react-dom lucide-react
  4. 04

    Import the stylesheet

    Import once in your Vite entry CSS (commonly `resources/css/app.css`).

    @import "@default-file/ui/css/df-index.css";
  5. 05

    Use a component

    import { Button } from "@default-file/ui/components/df-button"
    
    export default function Welcome() {
      return <Button>Click me</Button>
    }

Notes

  • Prefer the package for most apps. For copy-source installs, add foundation first (`itsvigneshv/default-file-ui/foundation`), then individual items from each component page.
  • Blade or Livewire-only apps are not supported — the kit requires a React runtime.

Using a different stack? Choose another framework.