InstallationAstro
Install Default File UI in Astro with the React integration.
Scaffold a new project with Default File UI already configured.
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 astro --name my-astro-appcd my-astro-app
npm run devimport { Button } from "@default-file/ui/components/df-button"
export function Example() {
return <Button>Click me</Button>
}Prefer the CLI init in your app folder, or follow the manual steps.
Include the React integration. Skip if you already have Astro + React.
npm create astro@latest
npx astro add reactnpx --yes -p github:itsvigneshv/default-file-ui#main df-ui init --framework astronpm install github:itsvigneshv/default-file-ui#main react react-dom lucide-reactImport once in a shared layout (for example `src/layouts/Layout.astro`).
---
import "@default-file/ui/css/df-index.css"
---
<html lang="en">
<body>
<slot />
</body>
</html>Interactive widgets need a client directive so Astro hydrates them.
---
import { Button } from "@default-file/ui/components/df-button"
---
<Button client:load>Click me</Button>Using a different stack? Choose another framework.