InstallationReact Router

React Router

Install Default File UI in a React Router framework project.

Use the CLI

Scaffold a new project with Default File UI already configured.

  1. 01

    Scaffold with the CLI

    Creates the framework app and wires Default File UI (package, CSS, and framework config).

    npx --yes -p github:itsvigneshv/default-file-ui#main df-ui init -t react-router --name my-rr-app
  2. 02

    Start the app

    cd my-rr-app
    npm run dev
  3. 03

    Use a component

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

Existing project

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

  1. 01

    Create a project

    Skip if you already have a React Router app.

    npm create react-router@latest
  2. 02

    Run init in the project

    npx --yes -p github:itsvigneshv/default-file-ui#main df-ui init --framework react-router
  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 root stylesheet (commonly `app/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 Home() {
      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.

Using a different stack? Choose another framework.