mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-24 17:00:36 +01:00
feat(module): improve options
This commit is contained in:
@@ -27,7 +27,11 @@ bun add @nuxt/ui@next
|
||||
|
||||
::
|
||||
|
||||
2. Register the Nuxt UI module in your `nuxt.config.ts`:
|
||||
::warning
|
||||
Make sure you have `typescript` installed in your dev dependencies.
|
||||
::
|
||||
|
||||
2. Register the Nuxt UI module in your `nuxt.config.ts`{lang="ts-type"}:
|
||||
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
@@ -35,7 +39,9 @@ export default defineNuxtConfig({
|
||||
})
|
||||
```
|
||||
|
||||
3. Import Tailwind and Nuxt UI in your CSS:
|
||||
3. Import Tailwind and Nuxt UI in your `app.vue`{lang="ts-type"} or in your [CSS](https://nuxt.com/docs/getting-started/styling#the-css-property):
|
||||
|
||||
::code-group
|
||||
|
||||
```vue [app.vue]
|
||||
<style>
|
||||
@@ -44,8 +50,11 @@ export default defineNuxtConfig({
|
||||
</style>
|
||||
```
|
||||
|
||||
::tip
|
||||
This is done here in the `<style>` block of your `app.vue` file, but you can also do it in a [`CSS`](https://nuxt.com/docs/getting-started/styling#the-css-property) file.
|
||||
```css [main.css]
|
||||
@import "tailwindcss";
|
||||
@import "@nuxt/ui";
|
||||
```
|
||||
|
||||
::
|
||||
|
||||
## Options
|
||||
@@ -86,9 +95,9 @@ export default defineNuxtConfig({
|
||||
This can be useful to reduce the number of CSS classes generated in your bundle.
|
||||
::
|
||||
|
||||
### `transitions`
|
||||
### `fonts`
|
||||
|
||||
Use the `transitions` option to disable all transitions on components.
|
||||
Use the `fonts` option to enable or disable the `@nuxt/fonts` module.
|
||||
|
||||
- Default: `true`{lang="ts-type"}
|
||||
|
||||
@@ -96,7 +105,24 @@ Use the `transitions` option to disable all transitions on components.
|
||||
export default defineNuxtConfig({
|
||||
modules: ['@nuxt/ui'],
|
||||
ui: {
|
||||
transitions: false
|
||||
fonts: false
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
### `theme.transitions`
|
||||
|
||||
Use the `theme.transitions` option to disable all transitions on components.
|
||||
|
||||
- Default: `true`{lang="ts-type"}
|
||||
|
||||
```ts [nuxt.config.ts]
|
||||
export default defineNuxtConfig({
|
||||
modules: ['@nuxt/ui'],
|
||||
ui: {
|
||||
theme: {
|
||||
transitions: false
|
||||
}
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user