Nuxt Config

Customizing Una UI with Nuxt configuration.

Una UI for Nuxt includes essential packages, you can also use them directly in your project without additional configuration.

PackageDescription
UnocssInstant On-demand Atomic CSS Engine
Color ModeDark and Light mode with auto detection made easy with Nuxt
VueuseCollection of essential Vue Composition API utils
Radix VueA Port of Radix UI primitives for Vue

Options

In your nuxt.config.js file, You can also add any configuration options to the una section.

OptionDefaultTypeDescription
prefixNstringUna UI component prefix
themeabletruebooleanEnable theming
globaltruebooleanRegister components globally

By default, Una UI will register all components globally. If you want to register components manually, set global to false. And you can do something like this import { NButton } from '@una-ui/nuxt' to import components.

nuxt.config.js
export default {
  modules: [
    '@una-ui/nuxt',
  ],

  una: {
    prefix: 'N',
    themeable: true,
    global: true,
  },
}

In your app.config.ts file, you can customize your default theme colors of Una UI.

Components and presets are based on a primary and gray colors, You can change the default value in your app.config.ts file.

OptionDefaultTypeDescription
primaryyellowstringPrimary color
graystonestringGray color
radius0.5numberBorder radius
fontSize16numberFont size
app.config.ts
export default defineAppConfig({
  una: {
    primary: 'yellow',
    gray: 'stone',
    radius: 0.5,
    fontSize: 16
  }
})