Change the folders in that file before adding components if you want them somewhere else.
In Nuxt the folders start with app/ (or with nothing, in projects without an app folder): app/components/ui and app/assets/styles/distill-ui.
2. Add components
npx distill-ui add button dialog
This copies each component into src/components/ui, along with any other component it
uses (Dialog uses Button). It also installs reka-ui with your package manager when a component needs them. Run npx distill-ui list to
see everything you can add, or npx distill-ui add --all to add it all.
The CLI never replaces a file you've changed. Pass --overwrite if you want the latest
version back.
3. Use them
<script setup lang="ts">import { Button } from '@/components/ui/button';import * as Dialog from '@/components/ui/dialog';</script><template> <Button>Click me</Button></template>
Projects made with npm create vue point @ at src. In
Nuxt, import from ~/components/ui/button.
Manually
Everything the CLI does, you can do by copying files yourself.
Copy the packages/tokens folder from the GitHub repo into src/styles/distill-ui: tokens.css and keyframes.css.
Import the tokens once, in your app's entry file: src/main.ts
import './styles/distill-ui/tokens.css';import { createApp } from 'vue';import App from './App.vue';createApp(App).mount('#app');
In Nuxt, add them to nuxt.config.ts instead, and have Nuxt auto-import only the .vue files: nuxt.config.ts
export default defineNuxtConfig({ css: ['~/assets/styles/distill-ui/tokens.css'], // Each component folder has an index.ts; auto-import only the .vue files so they don't clash. components: [{ path: '~/components', extensions: ['.vue'] }]});
Install the packages that dialogs, menus and other interactive components use:
npm install reka-ui
Copy the files from each component's page, under Installation → Manual, into src/components/ui/<component>.