Build modern Vue/Nuxt applications with Nuxt UI — a comprehensive component library powered by Radix Vue and Tailwind CSS v4. Covers installation, theming, component usage, and form patterns for Nuxt 3 applications. Use when: nuxt ui, vue components, nuxt components, radix vue, nuxt design system.
A UI Library for Modern Web Apps — fully styled, accessible components for Nuxt 3 powered by Radix Vue and Tailwind CSS v4.
npx nuxi@latest module add ui
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['@nuxt/ui'],
})
Nuxt UI v3 uses Tailwind CSS v4. Import the theme in your CSS:
/* assets/css/main.css */
@import "tailwindcss";
@import "@nuxt/ui";
<template>
<UButton label="Click me" />
<UButton label="Danger" color="red" variant="soft" />
<UButton label="Loading..." loading />
<UButton icon="i-lucide-plus" size="sm" />
</template>
<template>
<UForm :schema="schema" :state="state" @submit="onSubmit">
<UFormField label="Email" name="email">
<UInput v-model="state.email" type="email" />
</UFormField>
<UFormField label="Password" name="password">
<UInput v-model="state.password" type="password" />
</UFormField>
<UButton type="submit" label="Submit" />
</UForm>
</template>
<script setup lang="ts">
import { z } from 'zod'
const schema = z.object({
email: z.string().email(),
password: z.string().min(8),
})
const state = reactive({ email: '', password: '' })
const onSubmit = () => console.log(state)
</script>
<template>
<UTable :data="users" :columns="columns" />
</template>
<script setup>
const columns = [
{ accessorKey: 'name', header: 'Name' },
{ accessorKey: 'email', header: 'Email' },
{ accessorKey: 'role', header: 'Role' },
]
const users = [
{ name: 'John', email: '[email protected]', role: 'Admin' },
]
</script>
<template>
<UCommandPalette :groups="groups" />
</template>
<script setup>
const groups = [{
key: 'actions',
label: 'Actions',
commands: [
{ id: 'new', label: 'New file', icon: 'i-lucide-file-plus' },
{ id: 'search', label: 'Search', icon: 'i-lucide-search' },
]
}]
</script>
// app.config.ts
export default defineAppConfig({
ui: {
colors: {
primary: 'green',
neutral: 'slate',
},
},
})
Dark mode works out of the box with @nuxtjs/color-mode:
<template>
<UButton
:icon="isDark ? 'i-lucide-sun' : 'i-lucide-moon'"
@click="isDark = !isDark"
/>
</template>
<script setup>
const colorMode = useColorMode()
const isDark = computed({
get: () => colorMode.value === 'dark',
set: () => colorMode.preference = colorMode.value === 'dark' ? 'light' : 'dark',
})
</script>
i-lucide-* patternUForm with Zod or Yup schemas