# Table of Contents
- [The Intuitive Vue UI Library - Nuxt UI](#the-intuitive-vue-ui-library-nuxt-ui)
- [Introduction - Nuxt UI](#introduction-nuxt-ui)
- [Vue Components - Nuxt UI](#vue-components-nuxt-ui)
- [Nuxt UI Figma Design Kits](#nuxt-ui-figma-design-kits)
- [Build faster with Nuxt UI Pro.](#build-faster-with-nuxt-ui-pro-)
- [Installation - Nuxt UI](#installation-nuxt-ui)
- [Installation - Nuxt UI for Vue](#installation-nuxt-ui-for-vue)
- [Installation - Nuxt UI Pro](#installation-nuxt-ui-pro)
- [Installation - Nuxt UI Pro for Vue](#installation-nuxt-ui-pro-for-vue)
- [Vue App Component - Nuxt UI](#vue-app-component-nuxt-ui)
- [Vue Avatar Component - Nuxt UI](#vue-avatar-component-nuxt-ui)
- [Vue Accordion Component - Nuxt UI](#vue-accordion-component-nuxt-ui)
- [Vue AvatarGroup Component - Nuxt UI](#vue-avatargroup-component-nuxt-ui)
- [Vue Alert Component - Nuxt UI](#vue-alert-component-nuxt-ui)
- [Vue Breadcrumb Component - Nuxt UI](#vue-breadcrumb-component-nuxt-ui)
- [Vue ButtonGroup Component - Nuxt UI](#vue-buttongroup-component-nuxt-ui)
- [Vue Badge Component - Nuxt UI](#vue-badge-component-nuxt-ui)
- [Vue Card Component - Nuxt UI](#vue-card-component-nuxt-ui)
- [Vue Button Component - Nuxt UI](#vue-button-component-nuxt-ui)
- [Vue Checkbox Component - Nuxt UI](#vue-checkbox-component-nuxt-ui)
- [Vue Chip Component - Nuxt UI](#vue-chip-component-nuxt-ui)
- [Vue Collapsible Component - Nuxt UI](#vue-collapsible-component-nuxt-ui)
- [Migration - Nuxt UI](#migration-nuxt-ui)
- [Vue CheckboxGroup Component - Nuxt UI](#vue-checkboxgroup-component-nuxt-ui)
- [License - Nuxt UI Pro](#license-nuxt-ui-pro)
- [Vue Carousel Component - Nuxt UI](#vue-carousel-component-nuxt-ui)
- [Vue ColorPicker Component - Nuxt UI](#vue-colorpicker-component-nuxt-ui)
- [Vue Container Component - Nuxt UI](#vue-container-component-nuxt-ui)
- [Meet the Team - Nuxt UI](#meet-the-team-nuxt-ui)
- [Theme - Nuxt UI](#theme-nuxt-ui)
- [Icons - Nuxt UI](#icons-nuxt-ui)
- [Conditions Générales de Vente de Nuxt UI Pro](#conditions-g-n-rales-de-vente-de-nuxt-ui-pro)
- [Icons - Nuxt UI for Vue](#icons-nuxt-ui-for-vue)
- [Internationalization (i18n) - Nuxt UI](#internationalization-i18n-nuxt-ui)
- [Vue ChatPromptSubmit Component - Nuxt UI Pro](#vue-chatpromptsubmit-component-nuxt-ui-pro)
- [Fonts - Nuxt UI](#fonts-nuxt-ui)
- [Vue CommandPalette Component - Nuxt UI](#vue-commandpalette-component-nuxt-ui)
- [Vue ColorModeAvatar Component - Nuxt UI Pro](#vue-colormodeavatar-component-nuxt-ui-pro)
- [Color Mode - Nuxt UI](#color-mode-nuxt-ui)
- [Vue ContextMenu Component - Nuxt UI](#vue-contextmenu-component-nuxt-ui)
---
# The Intuitive Vue UI Library - Nuxt UI
The Intuitive
Vue UI Library
==============================
Create beautiful, responsive & accessible web apps quickly with Vue or Nuxt. Nuxt UI is an open-source UI library of 50+ customizable components built with Tailwind CSS and Reka UI.
[Get started](https://ui.nuxt.com/getting-started/installation/nuxt)
[Get started](https://ui.nuxt.com/getting-started/installation/vue)
[Get started](https://ui.nuxt.com/getting-started/installation/pro/nuxt)
[Get started](https://ui.nuxt.com/getting-started/installation/pro/vue)
[Explore components](https://ui.nuxt.com/components)
Styled with Tailwind CSS v4
Beautifully styled by default, overwrite any style you want.
Accessible with Reka UI
Robust accessibility out of the box.
Type-safe with TypeScript
Auto-complete and type safety for all components.
[App](https://ui.nuxt.com/components/app)
[Accordion](https://ui.nuxt.com/components/accordion)
[Alert](https://ui.nuxt.com/components/alert)
[Avatar](https://ui.nuxt.com/components/avatar)
[AvatarGroup](https://ui.nuxt.com/components/avatar-group)
[Badge](https://ui.nuxt.com/components/badge)
[Breadcrumb](https://ui.nuxt.com/components/breadcrumb)
[Button](https://ui.nuxt.com/components/button)
[ButtonGroup](https://ui.nuxt.com/components/button-group)
[Calendar](https://ui.nuxt.com/components/calendar)
[App](https://ui.nuxt.com/components/app)
[Accordion](https://ui.nuxt.com/components/accordion)
[Alert](https://ui.nuxt.com/components/alert)
[Avatar](https://ui.nuxt.com/components/avatar)
[AvatarGroup](https://ui.nuxt.com/components/avatar-group)
[Badge](https://ui.nuxt.com/components/badge)
[Breadcrumb](https://ui.nuxt.com/components/breadcrumb)
[Button](https://ui.nuxt.com/components/button)
[ButtonGroup](https://ui.nuxt.com/components/button-group)
[Calendar](https://ui.nuxt.com/components/calendar)
[App](https://ui.nuxt.com/components/app)
[Accordion](https://ui.nuxt.com/components/accordion)
[Alert](https://ui.nuxt.com/components/alert)
[Avatar](https://ui.nuxt.com/components/avatar)
[AvatarGroup](https://ui.nuxt.com/components/avatar-group)
[Badge](https://ui.nuxt.com/components/badge)
[Breadcrumb](https://ui.nuxt.com/components/breadcrumb)
[Button](https://ui.nuxt.com/components/button)
[ButtonGroup](https://ui.nuxt.com/components/button-group)
[Calendar](https://ui.nuxt.com/components/calendar)
[App](https://ui.nuxt.com/components/app)
[Accordion](https://ui.nuxt.com/components/accordion)
[Alert](https://ui.nuxt.com/components/alert)
[Avatar](https://ui.nuxt.com/components/avatar)
[AvatarGroup](https://ui.nuxt.com/components/avatar-group)
[Badge](https://ui.nuxt.com/components/badge)
[Breadcrumb](https://ui.nuxt.com/components/breadcrumb)
[Button](https://ui.nuxt.com/components/button)
[ButtonGroup](https://ui.nuxt.com/components/button-group)
[Calendar](https://ui.nuxt.com/components/calendar)
[Card](https://ui.nuxt.com/components/card)
[Carousel](https://ui.nuxt.com/components/carousel)
[Checkbox](https://ui.nuxt.com/components/checkbox)
[CheckboxGroup](https://ui.nuxt.com/components/checkbox-group)
[Chip](https://ui.nuxt.com/components/chip)
[Collapsible](https://ui.nuxt.com/components/collapsible)
[ColorPicker](https://ui.nuxt.com/components/color-picker)
[CommandPalette](https://ui.nuxt.com/components/command-palette)
[Container](https://ui.nuxt.com/components/container)
[ContextMenu](https://ui.nuxt.com/components/context-menu)
[Card](https://ui.nuxt.com/components/card)
[Carousel](https://ui.nuxt.com/components/carousel)
[Checkbox](https://ui.nuxt.com/components/checkbox)
[CheckboxGroup](https://ui.nuxt.com/components/checkbox-group)
[Chip](https://ui.nuxt.com/components/chip)
[Collapsible](https://ui.nuxt.com/components/collapsible)
[ColorPicker](https://ui.nuxt.com/components/color-picker)
[CommandPalette](https://ui.nuxt.com/components/command-palette)
[Container](https://ui.nuxt.com/components/container)
[ContextMenu](https://ui.nuxt.com/components/context-menu)
[Card](https://ui.nuxt.com/components/card)
[Carousel](https://ui.nuxt.com/components/carousel)
[Checkbox](https://ui.nuxt.com/components/checkbox)
[CheckboxGroup](https://ui.nuxt.com/components/checkbox-group)
[Chip](https://ui.nuxt.com/components/chip)
[Collapsible](https://ui.nuxt.com/components/collapsible)
[ColorPicker](https://ui.nuxt.com/components/color-picker)
[CommandPalette](https://ui.nuxt.com/components/command-palette)
[Container](https://ui.nuxt.com/components/container)
[ContextMenu](https://ui.nuxt.com/components/context-menu)
[Card](https://ui.nuxt.com/components/card)
[Carousel](https://ui.nuxt.com/components/carousel)
[Checkbox](https://ui.nuxt.com/components/checkbox)
[CheckboxGroup](https://ui.nuxt.com/components/checkbox-group)
[Chip](https://ui.nuxt.com/components/chip)
[Collapsible](https://ui.nuxt.com/components/collapsible)
[ColorPicker](https://ui.nuxt.com/components/color-picker)
[CommandPalette](https://ui.nuxt.com/components/command-palette)
[Container](https://ui.nuxt.com/components/container)
[ContextMenu](https://ui.nuxt.com/components/context-menu)
* [Go to Build for the modern web](https://ui.nuxt.com/getting-started)
Build for the modern web
------------------------
Powered by Tailwind CSS v4 and Reka UI for top performance and accessibility.
* [Go to Flexible design system](https://ui.nuxt.com/getting-started/theme#design-system)
Flexible design system
----------------------
Beautiful by default and easily customizable with design tokens to your brand.
* [Go to Internationalization (i18n)](https://ui.nuxt.com/getting-started/i18n/nuxt)
Internationalization (i18n)
---------------------------
Nuxt UI is translated into 30+ languages, works well with i18n and multi-directional support (LTR/RTL).
* [Go to Easy font customization](https://ui.nuxt.com/getting-started/fonts)
Easy font customization
-----------------------
Performance-optimized fonts with first-class @nuxt/fonts integration.
* [Go to Large icons sets](https://ui.nuxt.com/getting-started/icons)
Large icons sets
----------------
Access to over 200,000 customizable icons from Iconify, seamlessly integrated with Iconify.
* [Go to Light & Dark](https://ui.nuxt.com/getting-started/color-mode/nuxt)
Light & Dark
------------
Dark mode-ready components, seamless integration with @nuxtjs/color-mode.
Flexible design system
----------------------
Build your next project faster with Nuxt UI's comprehensive design system. Featuring semantic color aliases, comprehensive design tokens, and automatic light/dark mode support for accessible components out of the box.
* Color aliases via AppConfig
Configure 7 semantic color aliases (primary, secondary, success, info, warning, error, neutral) at runtime through AppConfig without rebuilding your application
* Comprehensive design tokens
Extensive set of neutral palette tokens for text, backgrounds, and borders with automatic light/dark mode support via CSS variables like --ui-text, --ui-bg, --ui-border
* Global style variables
Customize global styling with --ui-radius for consistent border rounding and --ui-container for layout widths across your entire application
[Customize design system](https://ui.nuxt.com/getting-started/theme#design-system)
app.config.tsmain.css
`export default defineAppConfig({ ui: { colors: { primary: 'indigo', secondary: 'pink', success: 'green', info: 'blue', warning: 'orange', error: 'red', neutral: 'zinc' } } })`
`@import "tailwindcss"; @import "@nuxt/ui"; :root { --ui-radius: 0.25rem; --ui-container: 90rem; --ui-bg: var(--ui-color-neutral-50); --ui-text: var(--ui-color-neutral-900); } .dark { --ui-bg: var(--ui-color-neutral-950); --ui-border: var(--ui-color-neutral-900); }`
Powerful component customization
--------------------------------
Nuxt UI leverages [Tailwind Variants](https://www.tailwind-variants.org/)
to provide a powerful, maintainable system for managing component styles and intelligently merging Tailwind CSS classes without conflicts.
* Powerful slot and variant system
Customize component parts with slots and apply different styles based on props, creating consistent UI patterns with granular control over styling
* Global theme with AppConfig
Configure component styles project-wide with a centralized AppConfig that maintains consistency across your application without rebuilding
* Per-component customization
Fine-tune individual components with the ui prop for slot-specific styling and class prop for root element overrides, providing maximum flexibility
[Customize components](https://ui.nuxt.com/getting-started/theme#customize-theme)
app.config.tsCollapsible.vue
`export default defineAppConfig({ ui: { button: { slots: { base: 'group font-bold', trailingIcon: 'group-data-[state=open]:rotate-180 transition-transform duration-200' }, defaultVariants: { color: 'neutral', variant: 'subtle' } } } })`
` `
Nuxt UI open-source community
-----------------------------
Join our thriving community to contribute code, report issues, suggest features, or help with documentation. Every contribution makes Nuxt UI better for everyone.
* [400K+\
\
monthly downloads](https://npm.chart.dev/@nuxt/ui)
* [4.9K+\
\
GitHub stars](https://github.com/nuxt/ui)
* [200+\
\
Contributors](https://github.com/nuxt/ui/graphs/contributors)
[Star on GitHub](https://github.com/nuxt/ui)
[Meet the team](https://ui.nuxt.com/team)
[](https://github.com/rdjanuar)
[](https://github.com/larbish)
[](https://github.com/eduayme)
[](https://github.com/farnabaz)
[](https://github.com/ivanmaxlogiudice)
[](https://github.com/genu)
[](https://github.com/connerblanton)
[](https://github.com/maximepvrt)
[](https://github.com/antfu)
[](https://github.com/noook)
[](https://github.com/HugoRCD)
[](https://github.com/sandros94)
[](https://github.com/danielroe)
[](https://github.com/hywax)
[](https://github.com/malik-jouda)
[](https://github.com/benjamincanac)
[](https://github.com/romhml)
[](https://github.com/atinux)
[](https://github.com/smarroufin)
[](https://github.com/Haythamasalama)
Build faster with Nuxt UI Pro.
------------------------------
A collection of premium Vue components, composables and utils built on top of Nuxt UI.
Focused on structure and layout, these responsive components are designed to be the perfect building blocks for your next idea.
[Discover Nuxt UI Pro](https://ui.nuxt.com/pro)
[Explore templates](https://ui.nuxt.com/pro/templates)












---
# Introduction - Nuxt UI
Introduction
============
Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.
[Reka UI](https://ui.nuxt.com/getting-started#reka-ui)
-------------------------------------------------------
We've transitioned from [Headless UI](https://headlessui.com/)
to [Reka UI](https://reka-ui.com/)
as our core component foundation. This shift brings several key advantages:
* **Extensive Component Library**: With 55+ primitives, Reka UI significantly expands our component offerings.
* **Active Development**: Reka UI's growing popularity ensures ongoing improvements and updates.
* **Enhanced Accessibility**: Built-in accessibility features align with our commitment to inclusive design.
* **Vue 3 Optimization**: Seamless integration with Vue 3 and the Composition API.
This transition empowers Nuxt UI to become a more comprehensive and flexible UI library, offering developers greater power and customization options.
[Tailwind CSS v4](https://ui.nuxt.com/getting-started#tailwind-css-v4)
-----------------------------------------------------------------------
Nuxt UI integrates the latest Tailwind CSS v4, bringing significant improvements:
* **Built for performance**: Full builds in the new engine are up to 5x faster, and incremental builds are over 100x faster — and measured in microseconds.
* **Unified toolchain**: Built-in import handling, vendor prefixing, and syntax transforms, with no additional tooling required.
* **CSS-first configuration**: A reimagined developer experience where you customize and extend the framework directly in CSS instead of a JavaScript configuration file.
* **Designed for the modern web**: Built on native cascade layers, wide-gamut colors, and including first-class support for modern CSS features like container queries, @starting-style, popovers, and more.
[](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3)
Learn about all the breaking changes in Tailwind CSS v4.
[Tailwind Variants](https://ui.nuxt.com/getting-started#tailwind-variants)
---------------------------------------------------------------------------
We've adopted [Tailwind Variants](https://www.tailwind-variants.org/)
to manage our design system, offering:
* **Dynamic Styling**: Flexible component variants with a powerful API
* **Type Safety**: Full TypeScript support with auto-completion
* **Conflict Resolution**: Efficient merging of conflicting styles
This integration unifies the styling of components, ensuring consistency and code maintainability.
[TypeScript Integration](https://ui.nuxt.com/getting-started#typescript-integration)
-------------------------------------------------------------------------------------
Nuxt UI offers significantly improved TypeScript integration, providing a superior developer experience:
* **Enhanced Auto-completion**:
* Full auto-completion for component props based on your theme
* Intelligent suggestions for `app.config.ts` theme configuration
* **Generic-based Components**:
* Built using [Vue 3 Generics](https://vuejs.org/api/sfc-script-setup.html#generics)
* Improved type inference for slots and events
* **Type-safe Theming**:
* Leveraging Tailwind Variants for type-safe styling options
* Customizable types for extended theme configurations
[](https://ui.nuxt.com/components/accordion#with-custom-slot)
Check out an example of the Accordion component with auto-completion for props and slots.
[Vue compatibility](https://ui.nuxt.com/getting-started#vue-compatibility)
---------------------------------------------------------------------------
You can now use Nuxt UI in any Vue project without Nuxt by adding the Vite and Vue plugins to your configuration. This provides:
* **Auto-imports**: Components and composables are automatically imported and available globally
* **Theming System**: Full theming support with customizable colors, sizes, variants and more
* **Developer Experience**: Complete TypeScript support with IntelliSense and auto-completion
[](https://ui.nuxt.com/getting-started/installation/vue)
Learn how to install and configure Nuxt UI in a Vue project in the **Vue installation guide**.
[Nuxt DevTools Integration](https://ui.nuxt.com/getting-started#nuxt-devtools-integration)
-------------------------------------------------------------------------------------------
You can play with Nuxt UI components as well as your app components directly from Nuxt Devtools with the [compodium](https://github.com/romhml/compodium)
module, providing a powerful development experience:
* **Component Inspector**: Inspect and analyze Nuxt UI components in real-time
* **Live Preview**: Modify component props and see changes instantly
* **Code Generation**: Get the corresponding code for your component configurations
Install the module to your Nuxt application with one command:
Terminal
`npx nuxt module add compodium`
[Migration](https://ui.nuxt.com/getting-started#migration)
-----------------------------------------------------------
We want to be transparent: migrating from Nuxt UI v2 to v3 will require significant effort. While we've maintained core concepts and components, Nuxt UI v3 has been rebuilt from the ground up, resulting in a new library with enhanced capabilities.
Key points to consider:
* Read our [migration guide](https://ui.nuxt.com/getting-started/migration)
to upgrade your project from v2 to v3.
* Review the new documentation and components carefully before attempting to upgrade.
* If you encounter any issues, please report them on our [GitHub repository](https://github.com/nuxt/ui/issues)
.
[FAQ](https://ui.nuxt.com/getting-started#faq)
-----------------------------------------------
Is Nuxt UI compatible with standalone Vue projects?
Nuxt UI is now compatible with Vue! You can follow the [installation guide](https://ui.nuxt.com/getting-started/installation/vue)
to get started.
What about Nuxt UI Pro?
We've also rebuilt Nuxt UI Pro from scratch as v3 to match Nuxt UI version. The license you bought or will buy is valid for both Nuxt UI Pro v1 and v3, this is a **free update**. You can follow the [installation guide](https://ui.nuxt.com/getting-started/installation/pro/nuxt)
to get started.
Will Nuxt UI work with other CSS frameworks like UnoCSS?
Nuxt UI is currently designed to work exclusively with Tailwind CSS. While there's interest in UnoCSS support, implementing it would require significant changes to the theme structure due to differences in class naming conventions. As a result, we don't have plans to add UnoCSS support.
How does Nuxt UI handle accessibility?
Nuxt UI enhances accessibility through Reka UI integration. This provides automatic ARIA attributes, keyboard navigation support, intelligent focus management, and screen reader announcements. While offering a strong foundation, proper implementation and testing in your specific use case remains crucial for full accessibility compliance. For more detailed information, refer to [Reka UI's accessibility documentation](https://reka-ui.com/docs/overview/accessibility)
.
What is the testing approach for Nuxt UI?
Nuxt UI ensures reliability with 1000+ Vitest tests, covering core functionality and accessibility. This robust testing suite supports the library's stability and serves as a reference for developers.
* * *
We're excited about the possibilities Nuxt UI v3 brings to your projects. Explore our documentation to learn more about new features, components, and best practices for building powerful, accessible user interfaces.
[Installation\
\
Learn how to install and configure Nuxt UI in your Nuxt application.](https://ui.nuxt.com/getting-started/installation/nuxt)
---
# Vue Components - Nuxt UI
[Made with Tailwind CSS v4](https://tailwindcss.com/)
Build beautiful UI with 108+ powerful components
================================================
Build your Vue or Nuxt application faster with Nuxt UI and Nuxt UI Pro components. Powered by Tailwind CSS and Reka UI, delivering responsive and customizable components.
[Start with Vue](https://ui.nuxt.com/getting-started/installation/vue)
[Start with Nuxt](https://ui.nuxt.com/getting-started/installation/nuxt)
[Element](https://ui.nuxt.com/components#element)
--------------------------------------------------
Core UI building blocks like buttons, badges, icons, avatars, and other fundamental interface elements.
Alert
A callout to draw user's attention.

[](https://ui.nuxt.com/components/alert)
Avatar
An img element with fallback and Nuxt Image support.

[](https://ui.nuxt.com/components/avatar)
AvatarGroup
Stack multiple avatars in a group.

[](https://ui.nuxt.com/components/avatar-group)
Badge
A short text to represent a status or a category.

[](https://ui.nuxt.com/components/badge)
Button
A button element that can act as a link or trigger an action.

[](https://ui.nuxt.com/components/button)
ButtonGroup
Group multiple button-like elements together.

[](https://ui.nuxt.com/components/button-group)
Calendar
A calendar component for selecting single dates, multiple dates or date ranges.

[](https://ui.nuxt.com/components/calendar)
ChatPromptSubmitPRO
A Button for submitting chat prompts with automatic status handling.

[](https://ui.nuxt.com/components/chat-prompt-submit)
Chip
An indicator of a numeric value or a state.

[](https://ui.nuxt.com/components/chip)
Collapsible
A collapsible element to toggle visibility of its content.

[](https://ui.nuxt.com/components/collapsible)
ColorModeAvatarPRO
An Avatar with a different source for light and dark mode.

[](https://ui.nuxt.com/components/color-mode-avatar)
ColorModeButtonPRO
A Button to switch between light and dark mode.

[](https://ui.nuxt.com/components/color-mode-button)
ColorModeImagePRO
An image element with a different source for light and dark mode.

[](https://ui.nuxt.com/components/color-mode-image)
ColorModeSelectPRO
A Select to switch between system, dark & light mode.

[](https://ui.nuxt.com/components/color-mode-select)
ColorModeSwitchPRO
A switch to toggle between light and dark mode.

[](https://ui.nuxt.com/components/color-mode-switch)
ContentSearchButtonPRO
A pre-styled Button to open the ContentSearch modal.

[](https://ui.nuxt.com/components/content-search-button)
DashboardSearchButtonPRO
A pre-styled Button to open the DashboardSearch modal.

[](https://ui.nuxt.com/components/dashboard-search-button)
DashboardSidebarCollapsePRO
A Button to collapse the sidebar on desktop.

[](https://ui.nuxt.com/components/dashboard-sidebar-collapse)
DashboardSidebarTogglePRO
A Button to toggle the sidebar on mobile.

[](https://ui.nuxt.com/components/dashboard-sidebar-toggle)
Icon
A component to display any icon from Iconify.

[](https://ui.nuxt.com/components/icon)
Kbd
A kbd element to display a keyboard key.

[](https://ui.nuxt.com/components/kbd)
LocaleSelectPRO
A Select to switch between locales.

[](https://ui.nuxt.com/components/locale-select)
Progress
An indicator showing the progress of a task.

[](https://ui.nuxt.com/components/progress)
[Form](https://ui.nuxt.com/components#form)
--------------------------------------------
Interactive form elements including inputs, selects, checkboxes, radio buttons, and advanced form validation components.
AuthFormPRO
A customizable Form to create login, register or password reset forms.

[](https://ui.nuxt.com/components/auth-form)
ChatPromptPRO
An enhanced Textarea for submitting prompts in AI chat interfaces.

[](https://ui.nuxt.com/components/chat-prompt)
Checkbox
An input element to toggle between checked and unchecked states.

[](https://ui.nuxt.com/components/checkbox)
CheckboxGroup
A set of checklist buttons to select multiple option from a list.

[](https://ui.nuxt.com/components/checkbox-group)
ColorPicker
A component to select a color.

[](https://ui.nuxt.com/components/color-picker)
Form
A form component with built-in validation and submission handling.

[](https://ui.nuxt.com/components/form)
FormField
A wrapper for form elements that provides validation and error handling.

[](https://ui.nuxt.com/components/form-field)
Input
An input element to enter text.

[](https://ui.nuxt.com/components/input)
InputMenu
An autocomplete input with real-time suggestions.

[](https://ui.nuxt.com/components/input-menu)
InputNumber
Input numerical values with a customizable range.

[](https://ui.nuxt.com/components/input-number)
PinInput
An input element to enter a pin.

[](https://ui.nuxt.com/components/pin-input)
RadioGroup
A set of radio buttons to select a single option from a list.

[](https://ui.nuxt.com/components/radio-group)
Select
A select element to choose from a list of options.

[](https://ui.nuxt.com/components/select)
SelectMenu
An advanced searchable select element.

[](https://ui.nuxt.com/components/select-menu)
Slider
An input to select a numeric value within a range.

[](https://ui.nuxt.com/components/slider)
Switch
A control that toggles between two states.

[](https://ui.nuxt.com/components/switch)
Textarea
A textarea element to input multi-line text.

[](https://ui.nuxt.com/components/textarea)
[Data](https://ui.nuxt.com/components#data)
--------------------------------------------
Components for displaying and managing data, including tables, lists, cards, data grids, and visualization elements.
Accordion
A stacked set of collapsible panels.

[](https://ui.nuxt.com/components/accordion)
BlogPostPRO
A customizable article to display in a blog page.

[](https://ui.nuxt.com/components/blog-post)
Carousel
A carousel with motion and swipe built using Embla.

[](https://ui.nuxt.com/components/carousel)
ChatMessagePRO
Display a chat message with icon, avatar, and actions.

[](https://ui.nuxt.com/components/chat-message)
PageAccordionPRO
A pre-styled Accordion to display in your pages.

[](https://ui.nuxt.com/components/page-accordion)
PageCardPRO
A pre-styled card component that displays a title, description and optional link.

[](https://ui.nuxt.com/components/page-card)
PageCTAPRO
A call to action section to display in your pages.

[](https://ui.nuxt.com/components/page-cta)
PageFeaturePRO
A component to showcase key features of your application.

[](https://ui.nuxt.com/components/page-feature)
PageHeaderPRO
A responsive header for your pages.

[](https://ui.nuxt.com/components/page-header)
PageHeroPRO
A responsive hero for your pages.

[](https://ui.nuxt.com/components/page-hero)
PageLogosPRO
A list of logos or images to display on your pages.

[](https://ui.nuxt.com/components/page-logos)
PageMarqueePRO
A component to create infinite scrolling content.

[](https://ui.nuxt.com/components/page-marquee)
PageSectionPRO
A responsive section for your pages.

[](https://ui.nuxt.com/components/page-section)
PricingPlanPRO
A customizable pricing plan to display in a pricing page.

[](https://ui.nuxt.com/components/pricing-plan)
PricingTablePRO
A responsive pricing table component that displays tiered pricing plans with feature comparisons.

[](https://ui.nuxt.com/components/pricing-table)
Table
A responsive table element to display data in rows and columns.

[](https://ui.nuxt.com/components/table)
Timeline
A component that displays a sequence of events with dates, titles, icons or avatars.

[](https://ui.nuxt.com/components/timeline)
Tree
A tree view component to display and interact with hierarchical data structures.

[](https://ui.nuxt.com/components/tree)
UserPRO
Display user information with name, description and avatar.

[](https://ui.nuxt.com/components/user)
[Navigation](https://ui.nuxt.com/components#navigation)
--------------------------------------------------------
Components for user navigation and wayfinding, including menus, breadcrumbs, pagination, and navigation bars.
Breadcrumb
A hierarchy of links to navigate through a website.

[](https://ui.nuxt.com/components/breadcrumb)
ChatPalettePRO
A chat palette to create a chatbot interface inside an overlay.

[](https://ui.nuxt.com/components/chat-palette)
CommandPalette
A command palette with full-text search powered by Fuse.js for efficient fuzzy matching.

[](https://ui.nuxt.com/components/command-palette)
ContentNavigationPRO
An accordion-style navigation component for organizing page links.

[](https://ui.nuxt.com/components/content-navigation)
ContentSurroundPRO
A pair of prev and next links to navigate between pages.

[](https://ui.nuxt.com/components/content-surround)
ContentTocPRO
A sticky Table of Contents with automatic active anchor link highlighting.

[](https://ui.nuxt.com/components/content-toc)
FooterColumnsPRO
A list of links as columns to display in your Footer.

[](https://ui.nuxt.com/components/footer-columns)
Link
A wrapper around with extra props.

[](https://ui.nuxt.com/components/link)
NavigationMenu
A list of links that can be displayed horizontally or vertically.

[](https://ui.nuxt.com/components/navigation-menu)
PageAnchorsPRO
A list of anchors to be displayed in the page.

[](https://ui.nuxt.com/components/page-anchors)
PageLinksPRO
A list of links to be displayed in the page.

[](https://ui.nuxt.com/components/page-links)
Pagination
A list of buttons or links to navigate through pages.

[](https://ui.nuxt.com/components/pagination)
Stepper
A set of steps that are used to indicate progress through a multi-step process.

[](https://ui.nuxt.com/components/stepper)
Tabs
A set of tab panels that are displayed one at a time.

[](https://ui.nuxt.com/components/tabs)
[Overlay](https://ui.nuxt.com/components#overlay)
--------------------------------------------------
Floating UI elements like modals, dialogs, tooltips, popovers, and other components that overlay the main content.
ContentSearchPRO
A ready to use CommandPalette to add to your documentation.

[](https://ui.nuxt.com/components/content-search)
ContextMenu
A menu to display actions when right-clicking on an element.

[](https://ui.nuxt.com/components/context-menu)
DashboardSearchPRO
A ready to use CommandPalette to add to your dashboard.

[](https://ui.nuxt.com/components/dashboard-search)
Drawer
A drawer that smoothly slides in & out of the screen.

[](https://ui.nuxt.com/components/drawer)
DropdownMenu
A menu to display actions when clicking on an element.

[](https://ui.nuxt.com/components/dropdown-menu)
Modal
A dialog window that can be used to display a message or request user input.

[](https://ui.nuxt.com/components/modal)
Popover
A non-modal dialog that floats around a trigger element.

[](https://ui.nuxt.com/components/popover)
Slideover
A dialog that slides in from any side of the screen.

[](https://ui.nuxt.com/components/slideover)
Toast
A succinct message to provide information or feedback to the user.

[](https://ui.nuxt.com/components/toast)
Tooltip
A popup that reveals information when hovering over an element.

[](https://ui.nuxt.com/components/tooltip)
[Layout](https://ui.nuxt.com/components#layout)
------------------------------------------------
Structural components for organizing content, including containers, grids, dividers, and responsive layout systems.
App
Wraps your app to provide global configurations and more.

[](https://ui.nuxt.com/components/app)
BannerPRO
Display a banner at the top of your website to inform users about important information.

[](https://ui.nuxt.com/components/banner)
BlogPostsPRO
Display a list of blog posts in a responsive grid layout.

[](https://ui.nuxt.com/components/blog-posts)
Card
Display content in a card with a header, body and footer.

[](https://ui.nuxt.com/components/card)
ChatMessagesPRO
Display a list of chat messages, designed to work seamlessly with Vercel AI SDK.

[](https://ui.nuxt.com/components/chat-messages)
Container
A container lets you center and constrain the width of your content.

[](https://ui.nuxt.com/components/container)
DashboardGroupPRO
A fixed layout component that provides context for dashboard components with sidebar state management and persistence.

[](https://ui.nuxt.com/components/dashboard-group)
DashboardNavbarPRO
A responsive navbar to display in a dashboard.

[](https://ui.nuxt.com/components/dashboard-navbar)
DashboardPanelPRO
A resizable panel to display in a dashboard.

[](https://ui.nuxt.com/components/dashboard-panel)
DashboardResizeHandlePRO
A handle to resize a sidebar or panel.

[](https://ui.nuxt.com/components/dashboard-resize-handle)
DashboardSidebarPRO
A resizable and collapsible sidebar to display in a dashboard.

[](https://ui.nuxt.com/components/dashboard-sidebar)
DashboardToolbarPRO
A toolbar to display under the navbar in a dashboard.

[](https://ui.nuxt.com/components/dashboard-toolbar)
ErrorPRO
A pre-built error component with NuxtError support.

[](https://ui.nuxt.com/components/error)
FooterPRO
A responsive footer component.

[](https://ui.nuxt.com/components/footer)
HeaderPRO
A responsive header component.

[](https://ui.nuxt.com/components/header)
MainPRO
A main element that fills the available viewport height.

[](https://ui.nuxt.com/components/main)
PagePRO
A grid layout for your pages with left and right columns.

[](https://ui.nuxt.com/components/page)
PageAsidePRO
A sticky aside to display your page navigation.

[](https://ui.nuxt.com/components/page-aside)
PageBodyPRO
The main content of your page.

[](https://ui.nuxt.com/components/page-body)
PageColumnsPRO
A responsive multi-column layout system for organizing content side-by-side.

[](https://ui.nuxt.com/components/page-columns)
PageGridPRO
A responsive grid system for displaying content in a flexible layout.

[](https://ui.nuxt.com/components/page-grid)
PageListPRO
A vertical list layout for displaying content in a stacked format.

[](https://ui.nuxt.com/components/page-list)
PricingPlansPRO
Display a list of pricing plans in a responsive grid layout.

[](https://ui.nuxt.com/components/pricing-plans)
Separator
Separates content horizontally or vertically.

[](https://ui.nuxt.com/components/separator)
Skeleton
A placeholder to show while content is loading.

[](https://ui.nuxt.com/components/skeleton)
---
# Nuxt UI Figma Design Kits
Sarah
Sebastien
From Figma to Nuxt, faster.
===============================
From wireframe to production in no time with the official Nuxt UI & Nuxt UI Pro design kits for Figma. Start free with the Nuxt UI Kit, or upgrade to Nuxt UI Pro for premium components, layouts, and enhanced design-to-code efficiency.
[Purchase Pro Kit](https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d)
[Free Figma Kit](https://go.nuxt.com/figma)
Watch 1 min demo
* Advanced Figma Features
Components, Local Variables, Auto Layout, Variants and more.
* Instant Theming
Customize your design system instantly using local variables and tokens.
* Two Powerful Design Kits
Start with essential components, or unlock Pro for complete blocks and templates.
Everything you need in a single file.
-----------------------------------------
Design and development in perfect sync with our [Free](https://www.figma.com/community/file/1288455405058138934/nuxt-ui-v3-official-design-kit-free)
and Pro files. Developers can implement designs faster, while designers work with production-ready components.
Customize in a few clicks to fit your needs
-------------------------------------------
Control your entire design system with Figma Variables. Update primitive tokens once and watch your changes spread across the entire system.
* Style with color variables powered by Tailwind CSS colors
* Apply over 500+ local variables across your entire file
* Build with unified tokens for consistency
[Preview UI Pro Design Kit](https://go.nuxt.com/figma-pro)
Define your tokensUse them in your design


One component, endless possibilities
------------------------------------
Create unlimited variations through nested components and swappable instances. Every element is fully themeable with props and slots, giving you complete control.
* Choose between 17K+ components and variants
* Customize designs with swap instance
* Switch between light and dark modes in one click
[Preview UI Pro Design Kit](https://go.nuxt.com/figma-pro)

Perfect match with development
------------------------------
Our Figma kit perfectly matches Nuxt UI Pro components, ensuring complete alignment between design and development.
* Match development standards using the same props and tokens
* Access Nuxt UI components through direct links
* Work together as design and dev teams share one component language
[Preview UI Pro Design Kit](https://go.nuxt.com/figma-pro)

Start designing now.
--------------------
**From download to deployment in simple steps.**
Get instant access to production-ready components and start creating.
[Get access now](https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d)
[Preview UI Pro Design Kit](https://go.nuxt.com/figma-pro)
* 
1 Download & Import
-------------------
After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
* 
2 Customize to your brand
-------------------------
Set your colors, typography, and styles to match your brand identity in minutes.
* 
3 Design your website
---------------------
Design beautiful interfaces with production-ready components. Drag, drop, and customize.
* 
4 Share it with your developers
-------------------------------
Perfect development handoff with components that match Nuxt UI's structure exactly.
* Ready-to-use Templates
Production-ready templates for marketing sites, documentation, and more included.
* Well-Documented System
Complete guides for designers and developers to master your design system.
* Icons Pack
Complete Lucide icon library included - 1500+ ready components.
Pricing plan that scale with you.
---------------------------------
Start for free with Nuxt UI components, or unlock the complete Nuxt UI Pro design kit with a one-time purchase.
Free Design Kit
Start with all Nuxt UI components and tokens.
FREE
* **Nuxt UI only components**
* 40+ fully customizable components
* Figma Local Variables for colors, typography, and effects
* Light and Dark mode ready
* Lucide icons (1500+ icons) integration
* Regular updates
[Open in Figma](https://go.nuxt.com/figma)
Used by 17,000+ designers.
Solo License
Design faster with all Nuxt UI Pro components.
$149
one-time paymentplus local taxes
* **1 Designer**
* Nuxt UI & Nuxt UI Pro Components
* Templates: Landing, Documentation, etc
* Quick Start with Step-by-step Guides
* Use on Unlimited Projects
* Lifetime Free Updates
[Buy now](https://nuxt.lemonsqueezy.com/buy/17213c49-621b-4c2c-9478-3a50a099003d)
[Preview in Figma](https://go.nuxt.com/figma-pro)
Team License
Everything you need to deliver faster as a team.
$349
one-time paymentplus local taxes
* **Up to 20 Designers**
* Nuxt UI & Nuxt UI Pro Components
* Templates: Landing, Documentation, etc
* Step-by-step guides to help you start
* Use on unlimited projects
* Lifetime free updates
[Buy now](https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d)
[Preview in Figma](https://go.nuxt.com/figma-pro)
Used by 2,000+ developers & designers around the world.
-------------------------------------------------------




Frequently Asked Questions
--------------------------
If you can't find what you're looking for, email our support team and if you're lucky someone will get back to you.
Can I use the UI kit on a free Figma account?
Yes. You don't need Figma's paid plan to use our UI kits.
Do you have a free trial?
We don't offer a free trial for the Pro Figma Kit, you can [preview it](https://go.nuxt.com/figma-pro)
.
How do I access the files after purchasing?
After purchasing, just extract the ZIP file and drag & drop it directly into Figma.
Can I upgrade my Solo license to the Team license?
Yes! Email us at [\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection#e185849288868fa18f949995cf828e8c)
with your details and we'll send you a discount code.
Can I use the UI Kit license for commercial projects?
Yes, the license allows you to sell your designs that utilize the UI Kit implementations.
Can I create multiple projects for multiple clients?
Yes, you can create multiple projects for multiple clients with the same license, there is no limit to the number of projects you can create.
Can I include UI Kit in an open source project?
No, the license does not allow you to include the UI Kit in an open source project where the design files are publicly accessible.
How do I contact you?
Email us at [\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection#4e2a2b3d2729200e203b363a602d2123)
with your details and we'll help you out.
What is your refund policy?
As the Figma Pro Kit is a digital product packaged as a zip file, we cannot offer refunds once the purchase is made.
Do you have a Figma to Code plugin?
We recommend the open source [TemPad Dev](https://github.com/ecomfe/tempad-dev)
inspect panel with the [TemPad Dev Nuxt UI Plugin](https://github.com/Justineo/tempad-dev-plugin-nuxt-ui)
:
1. Install the [TemPad Dev Chrome Extension](https://chromewebstore.google.com/detail/tempad-dev/lgoeakbaikpkihoiphamaeopmliaimpc)
2. Open your Figma file with Nuxt UI components (reload the page if you don't see the TemPad Dev panel)
3. Install the `@nuxt` (or `@nuxt/pro` for Nuxt UI Pro) in TemPad Dev's plugins section
4. Select any Nuxt UI component and inspect the code it generates

---
# Build faster with Nuxt UI Pro.
Build faster with Nuxt UI Pro.
==============================
A collection of premium Vue components, composables and utils built on top of Nuxt UI.
Focused on structure and layout, these responsive components are designed to be the perfect building blocks for your next idea.
[Buy a license](https://ui.nuxt.com/pro/pricing)
[Try for free](https://ui.nuxt.com/getting-started/installation/pro/nuxt)












Nuxt UI has allowed me to develop my SaaS without any prior mockups. The design quality of their components and the intelligence of the DX meant that I was able to try many different layouts for my application until I found the perfect UX for my users. Nuxt UI is the ui-kit I would have dreamed of building myself, and Nuxt UI Pro makes things even easier when you want to go further with your SaaS. Kudos to the team.

[](https://x.com/benjamincode)
Benjamin Code
YouTuber and Founder
Create stunning Vue applications faster.
----------------------------------------
Nuxt UI Pro comes packed with powerful features to help you build modern, performant, accessible and responsive Nuxt applications at record speed. From pre-built UI sections to Figma design kits, every detail is crafted to speed up your development and deliver a polished user experience.
* 40+ Ready-to-use Sections
Pre-built UI components for landing pages, documentation, blogs, dashboards, and more—ready to use out of the box.
* Auto Dark Mode
Seamlessly adapts to user preferences with a built-in dark mode switch—no extra configuration needed.
* Blazing-fast Performance
Optimized for Nuxt 3 with minimal bundle size, lightning-fast rendering, and best practices in performance.
* SEO & Accessibility Ready
Built with proper semantic HTML, structured data, and accessibility in mind for better rankings and usability.
* Fully Customizable UI
Modify colors, fonts, spacing, and layouts with Tailwind CSS and Nuxt UI’s design tokens to match your brand identity.
* Nuxt Content Support
Write content with Markdown and MDC, making it easy to build documentation, blogs, and knowledge bases.
* Vue-only mode
Enjoy the benefits of Nuxt UI Pro without Nuxt. Integrate it seamlessly into your Vue 3 + Vite projects and build modern UIs with ease.
* Built-in Internationalization (i18n)
Easily localize your site with built-in support for multiple languages and right-to-left (RTL) layouts.
* Figma Design Kits
Match your development workflow with Nuxt UI & UI Pro Figma UI kits, ensuring a fast transition from design to code.
Meet the Pro Components.
------------------------
Code with 50+ components and sections of Nuxt UI Pro to build your next application by reducing the amount of code you need to write.
The freedom to build anything
-----------------------------
Nuxt UI Pro ships with an extensive set of advanced components that cover a wide range of use-cases. Carefully crafted to reduce boilerplate code without sacrificing flexibility.
* Like Nuxt UI, change the style of any component from your App Config or customize them specifically through the ui prop.
* Each component leverages the power of Vue's slots to give you the flexibility to build anything.
* Nuxt UI Pro components aims to structure your content, they are responsive by design and will adapt to any screen size.
[Explore components](https://ui.nuxt.com/components)
app.vue
` `
The flexibility to display your data
------------------------------------
Although you can use any data source you want, Nuxt UI Pro is fully integrated with Nuxt Content and provides additional features when the module is detected.
* Nuxt UI Pro overrides Nuxt Content prose components to make them awesome but also adds new ones like Callout, CodeGroup, Field, etc.
* Nuxt UI Pro ships with a ready to use command palette component. No need to setup Algolia DocSearch anymore.
[Nuxt Content Integration](https://ui.nuxt.com/getting-started/content)
pages/\[...slug\].vue
` `
Templates
Kickstart with Nuxt UI Pro in seconds
-------------------------------------
Choose from a variety of templates to get started with Nuxt UI Pro in seconds. Each template is designed to help you build beautiful and responsive Nuxt applications in minutes.
Portfolio

[](https://portfolio-template.nuxt.dev/)
Chat

[](https://chat-template.nuxt.dev/)
Dashboard

[](https://dashboard-template.nuxt.dev/)
SaaS

[](https://saas-template.nuxt.dev/)
Landing

[](https://landing-template.nuxt.dev/)
Docs

[](https://docs-template.nuxt.dev/)
Starter

[](https://ui-pro-starter.nuxt.dev/)
Start with Nuxt UI Pro today!
-----------------------------
Nuxt UI Pro is free in development, but you need a license to use it in production.
[Buy a license](https://ui.nuxt.com/pro/pricing)
[Try for free](https://ui.nuxt.com/getting-started/installation/pro/nuxt)
---
# Installation - Nuxt UI
Installation
============
[Playground](https://codesandbox.io/p/devbox/nuxt-ui3-n3sxks)
Learn how to install and configure Nuxt UI in your Nuxt application.
[](https://ui.nuxt.com/getting-started/installation/vue)
Looking for the **Vue** version?
[Setup](https://ui.nuxt.com/getting-started/installation/nuxt#setup)
---------------------------------------------------------------------
### [Add to a Nuxt project](https://ui.nuxt.com/getting-started/installation/nuxt#add-to-a-nuxt-project)
#### [Install the Nuxt UI package](https://ui.nuxt.com/getting-started/installation/nuxt#install-the-nuxt-ui-package)
pnpmyarnnpmbun
`pnpm add @nuxt/ui`
`yarn add @nuxt/ui`
`npm install @nuxt/ui`
`bun add @nuxt/ui`
If you're using **pnpm**, ensure that you either set [`shamefully-hoist=true`](https://pnpm.io/npmrc#shamefully-hoist)
in your `.npmrc` file or install `tailwindcss` in your project's root directory.
#### [Add the Nuxt UI module in your `nuxt.config.ts`](https://ui.nuxt.com/getting-started/installation/nuxt#add-the-nuxt-ui-module-in-your-nuxtconfigts)
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'] })`
#### [Import Tailwind CSS and Nuxt UI in your CSS](https://ui.nuxt.com/getting-started/installation/nuxt#import-tailwind-css-and-nuxt-ui-in-your-css)
app/assets/css/main.cssnuxt.config.ts
`@import "tailwindcss"; @import "@nuxt/ui";`
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'] })`
It's recommended to install the [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
extension for VSCode and add the following settings:
.vscode/settings.json
``{ "files.associations": { "*.css": "tailwindcss" }, "editor.quickSuggestions": { "strings": "on" }, "tailwindCSS.classAttributes": ["class", "ui"], "tailwindCSS.experimental.classRegex": [ ["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"] ] }``
#### [Wrap your app with App component](https://ui.nuxt.com/getting-started/installation/nuxt#wrap-your-app-with-app-component)
app.vue
` `
[](https://ui.nuxt.com/components/app)
The `App` component provides global configurations and is required for **Toast**, **Tooltip** components to work as well as **Programmatic Overlays**.
### [Use our Nuxt Starter](https://ui.nuxt.com/getting-started/installation/nuxt#use-our-nuxt-starter)
Start your project using the [nuxt/starter#ui](https://github.com/nuxt/starter/tree/ui)
template with Nuxt UI pre-configured.
Create a new project locally by running the following command:
Terminal
`npm create nuxt@latest -- -t ui`
The `` argument is the name of the directory where the project will be created, replace it with your project name.
Once the installation is complete, navigate into your project and start the development server:
Terminal
`cd npm run dev`
[Options](https://ui.nuxt.com/getting-started/installation/nuxt#options)
-------------------------------------------------------------------------
You can customize Nuxt UI by providing options in your `nuxt.config.ts`.
### [`prefix`](https://ui.nuxt.com/getting-started/installation/nuxt#prefix)
Use the `prefix` option to change the prefix of the components.
* Default: `U`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { prefix: 'Nuxt' } })`
### [`fonts`](https://ui.nuxt.com/getting-started/installation/nuxt#fonts)
Use the `fonts` option to enable or disable the [`@nuxt/fonts`](https://github.com/nuxt/fonts)
module.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { fonts: false } })`
### [`colorMode`](https://ui.nuxt.com/getting-started/installation/nuxt#colormode)
Use the `colorMode` option to enable or disable the [`@nuxt/color-mode`](https://github.com/nuxt-modules/color-mode)
module.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { colorMode: false } })`
### [`theme.colors`](https://ui.nuxt.com/getting-started/installation/nuxt#themecolors)
Use the `theme.colors` option to define the dynamic color aliases used to generate components theme.
* Default: `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { theme: { colors: ['primary', 'error'] } } })`
[](https://ui.nuxt.com/getting-started/theme#colors)
Learn more about color customization and theming in the Theme section.
### [`theme.transitions`](https://ui.nuxt.com/getting-started/installation/nuxt#themetransitions)
Use the `theme.transitions` option to enable or disable transitions on components.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { theme: { transitions: false } } })`
This option adds the `transition-colors` class on components with hover or active states.
[Continuous Releases](https://ui.nuxt.com/getting-started/installation/nuxt#continuous-releases)
-------------------------------------------------------------------------------------------------
Nuxt UI uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
package.json
`{ "dependencies": { - "@nuxt/ui": "^3.0.0", + "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4c96909", } }`
**pkg.pr.new** will automatically comment on PRs with the installation URL, making it easy to test changes.
[Introduction\
\
Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.](https://ui.nuxt.com/getting-started)
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
---
# Installation - Nuxt UI for Vue
Installation
============
[Playground](https://codesandbox.io/p/devbox/nuxt-ui3-vue-4h5gqn)
Learn how to install and configure Nuxt UI in your Vue application.
[](https://ui.nuxt.com/getting-started/installation/nuxt)
Looking for the **Nuxt** version?
[Setup](https://ui.nuxt.com/getting-started/installation/vue#setup)
--------------------------------------------------------------------
### [Add to a Vue project](https://ui.nuxt.com/getting-started/installation/vue#add-to-a-vue-project)
#### [Install the Nuxt UI package](https://ui.nuxt.com/getting-started/installation/vue#install-the-nuxt-ui-package)
pnpmyarnnpmbun
`pnpm add @nuxt/ui`
`yarn add @nuxt/ui`
`npm install @nuxt/ui`
`bun add @nuxt/ui`
If you're using **pnpm**, ensure that you either set [`shamefully-hoist=true`](https://pnpm.io/npmrc#shamefully-hoist)
in your `.npmrc` file or install `tailwindcss`, `vue-router` and `@unhead/vue` in your project's root directory.
#### [Add the Nuxt UI Vite plugin in your `vite.config.ts`](https://ui.nuxt.com/getting-started/installation/vue#add-the-nuxt-ui-vite-plugin-in-your-viteconfigts)
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui() ] })`
Nuxt UI registers `unplugin-auto-import` and `unplugin-vue-components`, which will generate `auto-imports.d.ts` and `components.d.ts` type declaration files. You will likely want to gitignore these, and add them to your `tsconfig`.
tsconfig.app.json
`{ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "auto-imports.d.ts", "components.d.ts"] }`
.gitignore
`# Auto-generated type declarations auto-imports.d.ts components.d.ts`
Internally, Nuxt UI relies on custom alias to resolve the theme types. If you're using TypeScript, you should add an alias to your `tsconfig` to enable auto-completion in your `vite.config.ts`.
tsconfig.node.json
`{ "compilerOptions": { "paths": { "#build/ui": [ "./node_modules/@nuxt/ui/.nuxt/ui" ] } } }`
#### [Use the Nuxt UI Vue plugin in your `main.ts`](https://ui.nuxt.com/getting-started/installation/vue#use-the-nuxt-ui-vue-plugin-in-your-maints)
main.ts
`import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import ui from '@nuxt/ui/vue-plugin' import App from './App.vue' const app = createApp(App) const router = createRouter({ routes: [], history: createWebHistory() }) app.use(router) app.use(ui) app.mount('#app')`
[](https://ui.nuxt.com/getting-started/installation/vue#inertia)
If you're using [Inertia.js](https://inertiajs.com/)
, you can skip the `vue-router` setup as Inertia provides its own routing system.
#### [Import Tailwind CSS and Nuxt UI in your CSS](https://ui.nuxt.com/getting-started/installation/vue#import-tailwind-css-and-nuxt-ui-in-your-css)
assets/main.css
`@import "tailwindcss"; @import "@nuxt/ui";`
Import the CSS file in your `main.ts`.
main.ts
`import './assets/main.css' import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import ui from '@nuxt/ui/vue-plugin' import App from './App.vue' const app = createApp(App) const router = createRouter({ routes: [], history: createWebHistory() }) app.use(router) app.use(ui) app.mount('#app')`
It's recommended to install the [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
extension for VSCode and add the following settings:
.vscode/settings.json
``{ "files.associations": { "*.css": "tailwindcss" }, "editor.quickSuggestions": { "strings": "on" }, "tailwindCSS.classAttributes": ["class", "ui"], "tailwindCSS.experimental.classRegex": [ ["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"] ] }``
#### [Wrap your app with App component](https://ui.nuxt.com/getting-started/installation/vue#wrap-your-app-with-app-component)
App.vue
` `
[](https://ui.nuxt.com/components/app)
The `App` component provides global configurations and is required for **Toast**, **Tooltip** components to work as well as **Programmatic Overlays**.
### [Use our Vue starter](https://ui.nuxt.com/getting-started/installation/vue#use-our-vue-starter)
Start your project using the [nuxtlabs/nuxt-ui-vue-starter](https://github.com/nuxtlabs/nuxt-ui-vue-starter)
template with Nuxt UI pre-configured.
Create a new project locally by running the following command:
Terminal
`npm create nuxt@latest -- -t github:nuxtlabs/nuxt-ui-vue-starter`
The `` argument is the name of the directory where the project will be created, replace it with your project name.
Once the installation is complete, navigate into your project and start the development server:
Terminal
`cd npm run dev`
[Options](https://ui.nuxt.com/getting-started/installation/vue#options)
------------------------------------------------------------------------
You can customize Nuxt UI by providing options in your `vite.config.ts`.
### [`prefix`](https://ui.nuxt.com/getting-started/installation/vue#prefix)
Use the `prefix` option to change the prefix of the components.
* Default: `U`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ prefix: 'Nuxt' }) ] })`
### [`ui`](https://ui.nuxt.com/getting-started/installation/vue#ui)
Use the `ui` option to provide configuration for Nuxt UI.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { colors: { primary: 'green', neutral: 'slate' } } }) ] })`
### [`colorMode`](https://ui.nuxt.com/getting-started/installation/vue#colormode)
Use the `colorMode` option to enable or disable the color mode integration from `@vueuse/core`.
* Default: `true`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ colorMode: false }) ] })`
### [`theme.colors`](https://ui.nuxt.com/getting-started/installation/vue#themecolors)
Use the `theme.colors` option to define the dynamic color aliases used to generate components theme.
* Default: `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ theme: { colors: ['primary', 'error'] } }) ] })`
[](https://ui.nuxt.com/getting-started/theme#colors)
Learn more about color customization and theming in the Theme section.
### [`theme.transitions`](https://ui.nuxt.com/getting-started/installation/vue#themetransitions)
Use the `theme.transitions` option to enable or disable transitions on components.
* Default: `true`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ theme: { transitions: false } }) ] })`
This option adds the `transition-colors` class on components with hover or active states.
### [`inertia`](https://ui.nuxt.com/getting-started/installation/vue#inertia)
Use the `inertia` option to enable compatibility with [Inertia.js](https://inertiajs.com/)
.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ inertia: true }) ] })`
When using this option, `vue-router` is not required as Inertia.js provides its own routing system. The components that would normally use `RouterLink` will automatically use Inertia's `InertiaLink` component instead.
[Continuous Releases](https://ui.nuxt.com/getting-started/installation/vue#continuous-releases)
------------------------------------------------------------------------------------------------
Nuxt UI uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
package.json
`{ "dependencies": { - "@nuxt/ui": "^3.0.0", + "@nuxt/ui": "https://pkg.pr.new/@nuxt/ui@4c96909", } }`
**pkg.pr.new** will automatically comment on PRs with the installation URL, making it easy to test changes.
[Introduction\
\
Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.](https://ui.nuxt.com/getting-started)
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
---
# Installation - Nuxt UI Pro
InstallationPRO
===============
[Starter](https://github.com/nuxt-ui-pro/starter)
[Playground](https://codesandbox.io/p/devbox/nuxt-ui-pro3-fdcykl)
Learn how to install and configure Nuxt UI Pro in your Nuxt application.
[](https://ui.nuxt.com/getting-started/installation/pro/vue)
Looking for the **Vue** version?
Nuxt UI Pro is a collection of Vue components, composables and utils built on top of Nuxt UI, oriented on structure and layout and designed to be used as building blocks for your app.
[](https://ui.nuxt.com/getting-started/license)
While Nuxt UI is free and open source, Nuxt UI Pro is a premium product that helps sustain Nuxt OSS development, check out the **License** section to learn more.
[Setup](https://ui.nuxt.com/getting-started/installation/pro/nuxt#setup)
-------------------------------------------------------------------------
### [Add to a Nuxt project](https://ui.nuxt.com/getting-started/installation/pro/nuxt#add-to-a-nuxt-project)
#### [Install the Nuxt UI Pro package](https://ui.nuxt.com/getting-started/installation/pro/nuxt#install-the-nuxt-ui-pro-package)
pnpmyarnnpmbun
`pnpm add @nuxt/ui-pro`
`yarn add @nuxt/ui-pro`
`npm install @nuxt/ui-pro`
`bun add @nuxt/ui-pro`
If you're using **pnpm**, ensure that you either set [`shamefully-hoist=true`](https://pnpm.io/npmrc#shamefully-hoist)
in your `.npmrc` file or install `tailwindcss` in your project's root directory.
#### [Add the Nuxt UI Pro module in your `nuxt.config.ts`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#add-the-nuxt-ui-pro-module-in-your-nuxtconfigts)
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'] })`
The `@nuxt/ui-pro` module automatically includes the `@nuxt/ui` module, so you don't need to install it separately.
#### [Import Tailwind CSS and Nuxt UI Pro in your CSS](https://ui.nuxt.com/getting-started/installation/pro/nuxt#import-tailwind-css-and-nuxt-ui-pro-in-your-css)
assets/css/main.cssnuxt.config.ts
`@import "tailwindcss"; @import "@nuxt/ui-pro";`
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'] })`
The `@nuxt/ui-pro` CSS file includes the `@nuxt/ui` CSS file, so you don't need to import it separately.
It's recommended to install the [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
extension for VSCode and add the following settings:
.vscode/settings.json
``{ "files.associations": { "*.css": "tailwindcss" }, "editor.quickSuggestions": { "strings": "on" }, "tailwindCSS.classAttributes": ["class", "ui"], "tailwindCSS.experimental.classRegex": [ ["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"] ] }``
#### [Wrap your app with App component](https://ui.nuxt.com/getting-started/installation/pro/nuxt#wrap-your-app-with-app-component)
app.vue
` `
[](https://ui.nuxt.com/components/app)
The `App` component provides global configurations and is required for **Toast** and **Tooltip** components to work.
### [Upgrade from Nuxt UI](https://ui.nuxt.com/getting-started/installation/pro/nuxt#upgrade-from-nuxt-ui)
#### [Replace `@nuxt/ui` package with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#replace-nuxtui-package-with-nuxtui-pro)
package.json
`{ "dependencies": { - "@nuxt/ui": "^3.0.0", + "@nuxt/ui-pro": "^3.0.0", } }`
#### [Replace `@nuxt/ui` module with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#replace-nuxtui-module-with-nuxtui-pro)
nuxt.config.ts
`export default defineNuxtConfig({ - modules: ['@nuxt/ui'], + modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'] })`
#### [Replace `@nuxt/ui` CSS import with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#replace-nuxtui-css-import-with-nuxtui-pro)
assets/css/main.css
`@import "tailwindcss"; - @import "@nuxt/ui"; + @import "@nuxt/ui-pro";`
### [Use an official template](https://ui.nuxt.com/getting-started/installation/pro/nuxt#use-an-official-template)
You can get started with our [minimal starter](https://github.com/nuxt-ui-pro/starter)
or one of our official templates:
[](https://github.com/nuxt-ui-pro/landing)
Landing
A landing page you can use as starting point.
[](https://github.com/nuxt-ui-pro/docs)
Docs
A documentation with Nuxt Content.
[](https://github.com/nuxt-ui-pro/saas)
SaaS
A template with landing, pricing, docs and blog.
[](https://github.com/nuxt-ui-pro/dashboard)
Dashboard
A dashboard with multi-column layout.
[](https://github.com/nuxt-ui-pro/chat)
Chat
A chat application with Vercel AI SDK integration.
[](https://github.com/nuxt-ui-pro/portfolio)
Portfolio
A portfolio website with a modern design.
You can use the `Use this template` button on GitHub to create a new repository or use the CLI:
StarterLandingDocsSaaSDashboardChatPortfolio
`npm create nuxt@latest -- -t github:nuxt-ui-pro/starter`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/landing`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/docs`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/saas`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/dashboard`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/chat`
`npm create nuxt@latest -- -t github:nuxt-ui-pro/portfolio`
[Options](https://ui.nuxt.com/getting-started/installation/pro/nuxt#options)
-----------------------------------------------------------------------------
You can customize Nuxt UI Pro by providing options in your `nuxt.config.ts`.
### [`license`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#license)
Use the `license` option to override the default behavior of reading the license key from the `NUXT_UI_PRO_LICENSE` environment variable.
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], uiPro: { license: process.env.MY_ENVIRONMENT_VARIABLE } })`
Don't commit your license key to a public repository to avoid exposing it.
### [`mdc`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#mdc)
Use the `mdc` option to force the import of MDC components even if `@nuxtjs/mdc` or `@nuxt/content` is not installed.
* Default: `false`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], uiPro: { mdc: true } })`
### [`content`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#content)
Use the `content` option to force the import of content components even if `@nuxt/content` is not installed.
* Default: `false`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], uiPro: { content: true } })`
### [`prefix`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#prefix)
Use the `prefix` option to change the prefix of the components.
* Default: `U`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], ui: { prefix: 'Nuxt' } })`
### [`fonts`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#fonts)
Use the `fonts` option to enable or disable the [`@nuxt/fonts`](https://github.com/nuxt/fonts)
module.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], ui: { fonts: false } })`
### [`colorMode`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#colormode)
Use the `colorMode` option to enable or disable the [`@nuxt/color-mode`](https://github.com/nuxt-modules/color-mode)
module.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], ui: { colorMode: false } })`
### [`theme.colors`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#themecolors)
Use the `theme.colors` option to define the dynamic color aliases used to generate components theme.
* Default: `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], ui: { theme: { colors: ['primary', 'error'] } } })`
[](https://ui.nuxt.com/getting-started/theme#colors)
Learn more about color customization and theming in the Theme section.
### [`theme.transitions`](https://ui.nuxt.com/getting-started/installation/pro/nuxt#themetransitions)
Use the `theme.transitions` option to enable or disable transitions on components.
* Default: `true`
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui-pro'], css: ['~/assets/css/main.css'], ui: { theme: { transitions: false } } })`
This option adds the `transition-colors` class on components with hover or active states.
[Continuous Releases](https://ui.nuxt.com/getting-started/installation/pro/nuxt#continuous-releases)
-----------------------------------------------------------------------------------------------------
Nuxt UI Pro uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
package.json
`{ "dependencies": { - "@nuxt/ui-pro": "^3.0.0", + "@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@fb69f59", } }`
**pkg.pr.new** will automatically comment on PRs with the installation URL, making it easy to test changes.
[Introduction\
\
Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.](https://ui.nuxt.com/getting-started)
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
---
# Installation - Nuxt UI Pro for Vue
InstallationPRO
===============
[Starter](https://github.com/nuxt-ui-pro/starter-vue)
[Playground](https://codesandbox.io/p/devbox/nuxt-ui-pro3-vue-c2y2ml)
Learn how to install and configure Nuxt UI Pro in your Vue application.
[](https://ui.nuxt.com/getting-started/installation/pro/nuxt)
Looking for the **Nuxt** version?
Nuxt UI Pro is a collection of Vue components, composables and utils built on top of Nuxt UI, oriented on structure and layout and designed to be used as building blocks for your app.
[](https://ui.nuxt.com/getting-started/license)
While Nuxt UI is free and open source, Nuxt UI Pro is a premium product that helps sustain Nuxt OSS development, check out the **License** section to learn more.
[Setup](https://ui.nuxt.com/getting-started/installation/pro/vue#setup)
------------------------------------------------------------------------
### [Add to a Vue project](https://ui.nuxt.com/getting-started/installation/pro/vue#add-to-a-vue-project)
#### [Install the Nuxt UI Pro package](https://ui.nuxt.com/getting-started/installation/pro/vue#install-the-nuxt-ui-pro-package)
pnpmyarnnpmbun
`pnpm add @nuxt/ui-pro`
`yarn add @nuxt/ui-pro`
`npm install @nuxt/ui-pro`
`bun add @nuxt/ui-pro`
If you're using **pnpm**, ensure that you either set [`shamefully-hoist=true`](https://pnpm.io/npmrc#shamefully-hoist)
in your `.npmrc` file or install `tailwindcss`, `vue-router` and `@unhead/vue` in your project's root directory.
#### [Add the Nuxt UI Pro Vite plugin in your `vite.config.ts`](https://ui.nuxt.com/getting-started/installation/pro/vue#add-the-nuxt-ui-pro-vite-plugin-in-your-viteconfigts)
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro() ] })`
Nuxt UI registers `unplugin-auto-import` and `unplugin-vue-components`, which will generate `auto-imports.d.ts` and `components.d.ts` type declaration files. You will likely want to gitignore these, and add them to your `tsconfig`.
tsconfig.app.json
`{ "include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue", "auto-imports.d.ts", "components.d.ts"] }`
.gitignore
`# Auto-generated type declarations auto-imports.d.ts components.d.ts`
Internally, Nuxt UI relies on custom alias to resolve the theme types. If you're using TypeScript, you should add an alias to your `tsconfig` to enable auto-completion in your `vite.config.ts`.
tsconfig.node.json
`{ "compilerOptions": { "paths": { "#build/ui": [ "./node_modules/@nuxt/ui/.nuxt/ui" ] } } }`
#### [Use the Nuxt UI Vue plugin in your `main.ts`](https://ui.nuxt.com/getting-started/installation/pro/vue#use-the-nuxt-ui-vue-plugin-in-your-maints)
main.ts
`import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import ui from '@nuxt/ui/vue-plugin' import App from './App.vue' const app = createApp(App) const router = createRouter({ routes: [], history: createWebHistory() }) app.use(router) app.use(ui) app.mount('#app')`
[](https://ui.nuxt.com/getting-started/installation/pro/vue#inertia)
If you're using [Inertia.js](https://inertiajs.com/)
, you can skip the `vue-router` setup as Inertia provides its own routing system.
#### [Import Tailwind CSS and Nuxt UI Pro in your CSS](https://ui.nuxt.com/getting-started/installation/pro/vue#import-tailwind-css-and-nuxt-ui-pro-in-your-css)
assets/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro";`
Import the CSS file in your `main.ts`.
main.ts
`import './assets/main.css' import { createApp } from 'vue' import { createRouter, createWebHistory } from 'vue-router' import ui from '@nuxt/ui/vue-plugin' import App from './App.vue' const app = createApp(App) const router = createRouter({ routes: [], history: createWebHistory() }) app.use(router) app.use(ui) app.mount('#app')`
It's recommended to install the [Tailwind CSS IntelliSense](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss)
extension for VSCode and add the following settings:
.vscode/settings.json
``{ "files.associations": { "*.css": "tailwindcss" }, "editor.quickSuggestions": { "strings": "on" }, "tailwindCSS.classAttributes": ["class", "ui"], "tailwindCSS.experimental.classRegex": [ ["ui:\\s*{([^)]*)\\s*}", "(?:'|\"|`)([^']*)(?:'|\"|`)"] ] }``
#### [Wrap your app with App component](https://ui.nuxt.com/getting-started/installation/pro/vue#wrap-your-app-with-app-component)
App.vue
` `
[](https://ui.nuxt.com/components/app)
The `App` component provides global configurations and is required for **Toast** and **Tooltip** components to work.
### [Upgrade from Nuxt UI](https://ui.nuxt.com/getting-started/installation/pro/vue#upgrade-from-nuxt-ui)
#### [Replace `@nuxt/ui` package with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/vue#replace-nuxtui-package-with-nuxtui-pro)
package.json
`{ "dependencies": { - "@nuxt/ui": "^3.0.0", + "@nuxt/ui-pro": "^3.0.0", } }`
#### [Replace `@nuxt/ui` vite plugin with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/vue#replace-nuxtui-vite-plugin-with-nuxtui-pro)
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' - import ui from '@nuxt/ui/vite' + import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), - ui(), + uiPro() ] })`
#### [Replace `@nuxt/ui` CSS import with `@nuxt/ui-pro`](https://ui.nuxt.com/getting-started/installation/pro/vue#replace-nuxtui-css-import-with-nuxtui-pro)
assets/css/main.css
`@import "tailwindcss"; - @import "@nuxt/ui"; + @import "@nuxt/ui-pro";`
### [Use an official template](https://ui.nuxt.com/getting-started/installation/pro/vue#use-an-official-template)
You can get started with our official Vue templates:
[](https://github.com/nuxt-ui-pro/dashboard-vue)
Dashboard
A Vue dashboard template with multi-column layout.
[](https://github.com/nuxt-ui-pro/starter-vue)
Starter Vue
A minimal Nuxt UI Pro setup for Vue.
[](https://github.com/nuxt-ui-pro/starter-adonis)
Starter Adonis
A minimal Nuxt UI Pro setup for AdonisJS using Inertia.js.
[](https://github.com/nuxt-ui-pro/starter-laravel)
Starter Laravel
A minimal Nuxt UI Pro setup for Laravel using Inertia.js.
You can use the `Use this template` button on GitHub to create a new repository or use the CLI:
StarterDashboard
`npx giget@latest gh:nuxt-ui-pro/starter-vue my-vue-starter`
`npx giget@latest gh:nuxt-ui-pro/dashboard-vue my-vue-dashboard`
Once the directory is created, you can install the dependencies and start the development server using the `npm run dev` command.
[Options](https://ui.nuxt.com/getting-started/installation/pro/vue#options)
----------------------------------------------------------------------------
You can customize Nuxt UI Pro by providing options in your `vite.config.ts`.
### [`prefix`](https://ui.nuxt.com/getting-started/installation/pro/vue#prefix)
Use the `prefix` option to change the prefix of the components.
* Default: `U`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ prefix: 'Nuxt' }) ] })`
### [`ui`](https://ui.nuxt.com/getting-started/installation/pro/vue#ui)
Use the `ui` option to provide configuration for Nuxt UI.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { colors: { primary: 'green', neutral: 'slate' } } }) ] })`
### [`uiPro`](https://ui.nuxt.com/getting-started/installation/pro/vue#uipro)
Use the `uiPro` option to provide configuration for Nuxt UI Pro.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ uiPro: { pageHero: { slots: { title: 'font-light' } } } }) ] })`
### [`colorMode`](https://ui.nuxt.com/getting-started/installation/pro/vue#colormode)
Use the `colorMode` option to enable or disable the color mode integration from `@vueuse/core`.
* Default: `true`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ colorMode: false }) ] })`
### [`theme.colors`](https://ui.nuxt.com/getting-started/installation/pro/vue#themecolors)
Use the `theme.colors` option to define the dynamic color aliases used to generate components theme.
* Default: `['primary', 'secondary', 'success', 'info', 'warning', 'error']`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ theme: { colors: ['primary', 'error'] } }) ] })`
[](https://ui.nuxt.com/getting-started/theme#colors)
Learn more about color customization and theming in the Theme section.
### [`theme.transitions`](https://ui.nuxt.com/getting-started/installation/pro/vue#themetransitions)
Use the `theme.transitions` option to enable or disable transitions on components.
* Default: `true`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ theme: { transitions: false } }) ] })`
This option adds the `transition-colors` class on components with hover or active states.
### [`inertia`](https://ui.nuxt.com/getting-started/installation/pro/vue#inertia)
Use the `inertia` option to enable compatibility with [Inertia.js](https://inertiajs.com/)
.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ inertia: true }) ] })`
When using this option, `vue-router` is not required as Inertia.js provides its own routing system. The components that would normally use `RouterLink` will automatically use Inertia's `InertiaLink` component instead.
### [`license`](https://ui.nuxt.com/getting-started/installation/pro/vue#license)
Use the `license` option to override the default behavior of reading the license key from the `NUXT_UI_PRO_LICENSE` environment variable.
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ license: process.env.MY_ENVIRONMENT_VARIABLE }) ] })`
Don't commit your license key to a public repository to avoid exposing it.
[Continuous Releases](https://ui.nuxt.com/getting-started/installation/pro/vue#continuous-releases)
----------------------------------------------------------------------------------------------------
Nuxt UI Pro uses [pkg.pr.new](https://github.com/stackblitz-labs/pkg.pr.new)
for continuous preview releases, providing developers with instant access to the latest features and bug fixes without waiting for official releases.
Automatic preview releases are created for all commits and PRs to the `v3` branch. Use them by replacing your package version with the specific commit hash or PR number.
package.json
`{ "dependencies": { - "@nuxt/ui-pro": "^3.0.0", + "@nuxt/ui-pro": "https://pkg.pr.new/@nuxt/ui-pro@fb69f59", } }`
**pkg.pr.new** will automatically comment on PRs with the installation URL, making it easy to test changes.
[Introduction\
\
Nuxt UI harnesses the combined strengths of Reka UI, Tailwind CSS, and Tailwind Variants to offer developers an unparalleled set of tools for creating sophisticated, accessible, and highly performant user interfaces.](https://ui.nuxt.com/getting-started)
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
---
# Vue App Component - Nuxt UI
App
===
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/App.vue)
Wraps your app to provide global configurations and more.
[Usage](https://ui.nuxt.com/components/app#usage)
--------------------------------------------------
This component implements Reka UI [ConfigProvider](https://reka-ui.com/docs/utilities/config-provider)
to provide global configuration to all components:
* Enables all primitives to inherit global reading direction.
* Enables changing the behavior of scroll body when setting body lock.
* Much more controls to prevent layout shifts.
It's also using [ToastProvider](https://reka-ui.com/docs/components/toast#provider)
and [TooltipProvider](https://reka-ui.com/docs/components/tooltip#provider)
to provide global toasts and tooltips, as well as programmatic modals and slideovers.
Use it at the root of your app:
app.vue
` `
[](https://ui.nuxt.com/getting-started/i18n/nuxt#locale)
Learn how to use the `locale` prop to change the locale of your app.
[](https://ui.nuxt.com/getting-started/i18n/vue#locale)
Learn how to use the `locale` prop to change the locale of your app.
[API](https://ui.nuxt.com/components/app#api)
----------------------------------------------
### [Props](https://ui.nuxt.com/components/app#props)
| Prop | Default | Type |
| --- | --- | --- |
| `tooltip` | | `TooltipProviderProps`
Show properties
* `delayDuration?: number`
The duration from when the pointer enters the trigger until the tooltip gets opened. Defaults to `700`.
* `skipDelayDuration?: number`
How much time a user has to enter another trigger without incurring a delay again. Defaults to `300`.
* `disableHoverableContent?: boolean`
When `true`, trying to hover the content will result in the tooltip closing as the pointer leaves the trigger. Defaults to `false`.
* `disableClosingTrigger?: boolean`
When `true`, clicking on trigger will not close the content. Defaults to `false`.
* `disabled?: boolean`
When `true`, disable tooltip Defaults to `false`.
* `ignoreNonKeyboardFocus?: boolean`
Prevent the tooltip from opening if the focus did not come from the keyboard by matching against the `:focus-visible` selector. This is useful if you want to avoid opening it when switching browser tabs or closing a dialog. Defaults to `false`. |
| `toaster` | | `null \| ToasterProps`
The global `nonce` value of your application. This will be inherited by the related primitives. |
### [Slots](https://ui.nuxt.com/components/app#slots)
| Slot | Type |
| --- | --- |
| `default` | `{}` |
[useToast\
\
A composable to display toast notifications in your app.](https://ui.nuxt.com/composables/use-toast)
[Accordion\
\
A stacked set of collapsible panels.](https://ui.nuxt.com/components/accordion)
---
# Vue Avatar Component - Nuxt UI
Avatar
======
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Avatar.vue)
An img element with fallback and Nuxt Image support.
[Usage](https://ui.nuxt.com/components/avatar#usage)
-----------------------------------------------------
The Avatar uses the `` component when [`@nuxt/image`](https://github.com/nuxt/image)
is installed, falling back to `img` otherwise.
You can pass any property from the HTML `` element such as `alt`, `loading`, etc.
### [Src](https://ui.nuxt.com/components/avatar#src)
Use the `src` prop to set the image URL.
src

` `
### [Size](https://ui.nuxt.com/components/avatar#size)
Use the `size` prop to set the size of the Avatar.
size
xl

` `
The `` element's `width` and `height` are automatically set based on the `size` prop.
### [Icon](https://ui.nuxt.com/components/avatar#icon)
Use the `icon` prop to display a fallback [Icon](https://ui.nuxt.com/components/icon)
.
icon
size
md
` `
### [Text](https://ui.nuxt.com/components/avatar#text)
Use the `text` prop to display a fallback text.
text
size
md
+1
` `
### [Alt](https://ui.nuxt.com/components/avatar#alt)
When no icon or text is provided, the **initials** of the `alt` prop is used as fallback.
alt
size
md
BC
` `
The `alt` prop is passed to the `img` element as the `alt` attribute.
[Examples](https://ui.nuxt.com/components/avatar#examples)
-----------------------------------------------------------
### [With tooltip](https://ui.nuxt.com/components/avatar#with-tooltip)
You can use a [Tooltip](https://ui.nuxt.com/components/tooltip)
component to display a tooltip when hovering the Avatar.

` `
### [With chip](https://ui.nuxt.com/components/avatar#with-chip)
You can use a [Chip](https://ui.nuxt.com/components/chip)
component to display a chip around the Avatar.

` `
[API](https://ui.nuxt.com/components/avatar#api)
-------------------------------------------------
### [Props](https://ui.nuxt.com/components/avatar#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'span'` | `any`
The position of the chip. Defaults to `'top-right'`.
* `inset?: boolean`
When `true`, keep the chip inside the component for rounded elements.
* `standalone?: boolean`
When `true`, render the chip relatively to the parent.
* `class?: any`
* `ui?: { root?: ClassNameValue; base?: ClassNameValue; }` |
| `ui` | | `{ root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }` |
[Theme](https://ui.nuxt.com/components/avatar#theme)
-----------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { avatar: { slots: { root: 'inline-flex items-center justify-center shrink-0 select-none rounded-full align-middle bg-elevated', image: 'h-full w-full rounded-[inherit] object-cover', fallback: 'font-medium leading-none text-muted truncate', icon: 'text-muted shrink-0' }, variants: { size: { '3xs': { root: 'size-4 text-[8px]' }, '2xs': { root: 'size-5 text-[10px]' }, xs: { root: 'size-6 text-xs' }, sm: { root: 'size-7 text-sm' }, md: { root: 'size-8 text-base' }, lg: { root: 'size-9 text-lg' }, xl: { root: 'size-10 text-xl' }, '2xl': { root: 'size-11 text-[22px]' }, '3xl': { root: 'size-12 text-2xl' } } }, defaultVariants: { size: 'md' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { avatar: { slots: { root: 'inline-flex items-center justify-center shrink-0 select-none rounded-full align-middle bg-elevated', image: 'h-full w-full rounded-[inherit] object-cover', fallback: 'font-medium leading-none text-muted truncate', icon: 'text-muted shrink-0' }, variants: { size: { '3xs': { root: 'size-4 text-[8px]' }, '2xs': { root: 'size-5 text-[10px]' }, xs: { root: 'size-6 text-xs' }, sm: { root: 'size-7 text-sm' }, md: { root: 'size-8 text-base' }, lg: { root: 'size-9 text-lg' }, xl: { root: 'size-10 text-xl' }, '2xl': { root: 'size-11 text-[22px]' }, '3xl': { root: 'size-12 text-2xl' } } }, defaultVariants: { size: 'md' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { avatar: { slots: { root: 'inline-flex items-center justify-center shrink-0 select-none rounded-full align-middle bg-elevated', image: 'h-full w-full rounded-[inherit] object-cover', fallback: 'font-medium leading-none text-muted truncate', icon: 'text-muted shrink-0' }, variants: { size: { '3xs': { root: 'size-4 text-[8px]' }, '2xs': { root: 'size-5 text-[10px]' }, xs: { root: 'size-6 text-xs' }, sm: { root: 'size-7 text-sm' }, md: { root: 'size-8 text-base' }, lg: { root: 'size-9 text-lg' }, xl: { root: 'size-10 text-xl' }, '2xl': { root: 'size-11 text-[22px]' }, '3xl': { root: 'size-12 text-2xl' } } }, defaultVariants: { size: 'md' } } } }) ] })`
Expand code
[Alert\
\
A callout to draw user's attention.](https://ui.nuxt.com/components/alert)
[AvatarGroup\
\
Stack multiple avatars in a group.](https://ui.nuxt.com/components/avatar-group)
---
# Vue Accordion Component - Nuxt UI
Accordion
=========
[Accordion](https://reka-ui.com/docs/components/accordion)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Accordion.vue)
A stacked set of collapsible panels.
[Usage](https://ui.nuxt.com/components/accordion#usage)
--------------------------------------------------------
### [Items](https://ui.nuxt.com/components/accordion#items)
Use the `items` prop as an array of objects with the following properties:
* `label?: string`
* `icon?: string`
* `trailingIcon?: string`
* `content?: string`
* `value?: string`
* `disabled?: boolean`
* [`slot?: string`](https://ui.nuxt.com/components/accordion#with-custom-slot)
* `class?: any`
* `ui?: { item?: ClassNameValue, header?: ClassNameValue, trigger?: ClassNameValue, leadingIcon?: ClassNameValue, label?: ClassNameValue, trailingIcon?: ClassNameValue, content?: ClassNameValue, body?: ClassNameValue }`
Icons
Colors
Components
`` ``
### [Multiple](https://ui.nuxt.com/components/accordion#multiple)
Set the `type` prop to `multiple` to allow multiple items to be active at the same time. Defaults to `single`.
Icons
Colors
Components
`` ``
### [Collapsible](https://ui.nuxt.com/components/accordion#collapsible)
When `type` is `single`, you can set the `collapsible` prop to `false` to prevent the active item from collapsing.
Icons
Colors
Components
`` ``
### [Unmount](https://ui.nuxt.com/components/accordion#unmount)
Use the `unmount-on-hide` prop to prevent the content from being unmounted when the accordion is collapsed. Defaults to `true`.
unmountOnHide
false
Icons
You have nothing to do, @nuxt/icon will handle it automatically.
Colors
Choose a primary and a neutral color from your Tailwind CSS theme.
Components
You can customize components by using the \`class\` / \`ui\` props or in your app.config.ts.
`` ``
You can inspect the DOM to see each item's content being rendered.
### [Disabled](https://ui.nuxt.com/components/accordion#disabled)
Use the `disabled` property to disable the Accordion.
You can also disable a specific item by using the `disabled` property in the item object.
disabled
true
Icons
Colors
Components
`` ``
### [Trailing Icon](https://ui.nuxt.com/components/accordion#trailing-icon)
Use the `trailing-icon` prop to customize the trailing [Icon](https://ui.nuxt.com/components/icon)
of each item. Defaults to `i-lucide-chevron-down`.
You can also set an icon for a specific item by using the `trailingIcon` property in the item object.
trailingIcon
Icons
Colors
Components
`` ``
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.chevronDown` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.chevronDown` key.
[Examples](https://ui.nuxt.com/components/accordion#examples)
--------------------------------------------------------------
### [Control active item(s)](https://ui.nuxt.com/components/accordion#control-active-items)
You can control the active item(s) by using the `default-value` prop or the `v-model` directive with the index of the item.
Icons
You have nothing to do, @nuxt/icon will handle it automatically.
Colors
Components
`` ``
You can also pass the `value` of one of the items if provided.
When `type="multiple"`, ensure to pass an array to the `default-value` prop or the `v-model` directive.
### [With drag and drop](https://ui.nuxt.com/components/accordion#with-drag-and-drop)
Use the [`useSortable`](https://vueuse.org/integrations/useSortable/)
composable from [`@vueuse/integrations`](https://vueuse.org/integrations/README.html)
to enable drag and drop functionality on the Accordion. This integration wraps [Sortable.js](https://sortablejs.github.io/Sortable/)
to provide a seamless drag and drop experience.
Icons
Colors
Components
`` ``
### [With body slot](https://ui.nuxt.com/components/accordion#with-body-slot)
Use the `#body` slot to customize the body of each item.
Icons
Colors
Components
` This is the {{ item.label }} panel. `
The `#body` slot includes some pre-defined styles, use the [`#content` slot](https://ui.nuxt.com/components/accordion#with-content-slot)
if you want to start from scratch.
### [With content slot](https://ui.nuxt.com/components/accordion#with-content-slot)
Use the `#content` slot to customize the content of each item.
Icons
Colors
Components
`
This is the {{ item.label }} panel.
`
### [With custom slot](https://ui.nuxt.com/components/accordion#with-custom-slot)
Use the `slot` property to customize a specific item.
You will have access to the following slots:
* `#{{ item.slot }}`
* `#{{ item.slot }}-body`
Icons
Colors
Components
``
The icon displayed on the right side of the trigger. |
| `labelKey` | `'label'` | `string`
The key used to get the label from the item. |
| `collapsible` | `true` | `boolean`
When type is "single", allows closing content when clicking trigger for an open item. When type is "multiple", this prop has no effect. |
| `defaultValue` | | `string \| string[]`
The default active value of the item(s).
Use when you do not need to control the state of the item(s). |
| `modelValue` | | `string \| string[]`
The controlled value of the active item(s).
Use this when you need to control the state of the items. Can be binded with `v-model` |
| `type` | `'single'` | `"single" \| "multiple"`
Determines whether a "single" or "multiple" items can be selected at a time.
This prop will overwrite the inferred type from `modelValue` and `defaultValue`. |
| `disabled` | `false` | `boolean`
When `true`, prevents the user from interacting with the accordion and all its items |
| `unmountOnHide` | `true` | `boolean`
When `true`, the element will be unmounted on closed state. |
| `ui` | | `{ root?: ClassNameValue; item?: ClassNameValue; header?: ClassNameValue; trigger?: ClassNameValue; content?: ClassNameValue; body?: ClassNameValue; leadingIcon?: ClassNameValue; trailingIcon?: ClassNameValue; label?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/accordion#slots)
| Slot | Type |
| --- | --- |
| `leading` | `{ item: AccordionItem; index: number; open: boolean; }` |
| `default` | `{ item: AccordionItem; index: number; open: boolean; }` |
| `trailing` | `{ item: AccordionItem; index: number; open: boolean; }` |
| `content` | `{ item: AccordionItem; index: number; open: boolean; }` |
| `body` | `{ item: AccordionItem; index: number; open: boolean; }` |
### [Emits](https://ui.nuxt.com/components/accordion#emits)
| Event | Type |
| --- | --- |
| `update:modelValue` | `[value: string \| string[] \| undefined]` |
[Theme](https://ui.nuxt.com/components/accordion#theme)
--------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { accordion: { slots: { root: 'w-full', item: 'border-b border-default last:border-b-0', header: 'flex', trigger: 'group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-primary min-w-0', content: 'data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none', body: 'text-sm pb-3.5', leadingIcon: 'shrink-0 size-5', trailingIcon: 'shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200', label: 'text-start break-words' }, variants: { disabled: { true: { trigger: 'cursor-not-allowed opacity-75' } } } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { accordion: { slots: { root: 'w-full', item: 'border-b border-default last:border-b-0', header: 'flex', trigger: 'group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-primary min-w-0', content: 'data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none', body: 'text-sm pb-3.5', leadingIcon: 'shrink-0 size-5', trailingIcon: 'shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200', label: 'text-start break-words' }, variants: { disabled: { true: { trigger: 'cursor-not-allowed opacity-75' } } } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { accordion: { slots: { root: 'w-full', item: 'border-b border-default last:border-b-0', header: 'flex', trigger: 'group flex-1 flex items-center gap-1.5 font-medium text-sm py-3.5 focus-visible:outline-primary min-w-0', content: 'data-[state=open]:animate-[accordion-down_200ms_ease-out] data-[state=closed]:animate-[accordion-up_200ms_ease-out] overflow-hidden focus:outline-none', body: 'text-sm pb-3.5', leadingIcon: 'shrink-0 size-5', trailingIcon: 'shrink-0 size-5 ms-auto group-data-[state=open]:rotate-180 transition-transform duration-200', label: 'text-start break-words' }, variants: { disabled: { true: { trigger: 'cursor-not-allowed opacity-75' } } } } } }) ] })`
Expand code
[App\
\
Wraps your app to provide global configurations and more.](https://ui.nuxt.com/components/app)
[Alert\
\
A callout to draw user's attention.](https://ui.nuxt.com/components/alert)
---
# Vue AvatarGroup Component - Nuxt UI
AvatarGroup
===========
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/AvatarGroup.vue)
Stack multiple avatars in a group.
[Usage](https://ui.nuxt.com/components/avatar-group#usage)
-----------------------------------------------------------
Wrap multiple [Avatar](https://ui.nuxt.com/components/avatar)
within an AvatarGroup to stack them.

` `
### [Size](https://ui.nuxt.com/components/avatar-group#size)
Use the `size` prop to change the size of all the avatars.
size
xl

` `
### [Max](https://ui.nuxt.com/components/avatar-group#max)
Use the `max` prop to limit the number of avatars displayed. The rest is displayed as an `+X` avatar.
max
+1
` `
[Examples](https://ui.nuxt.com/components/avatar-group#examples)
-----------------------------------------------------------------
### [With tooltip](https://ui.nuxt.com/components/avatar-group#with-tooltip)
Wrap each avatar with a [Tooltip](https://ui.nuxt.com/components/tooltip)
to display a tooltip on hover.

` `
### [With chip](https://ui.nuxt.com/components/avatar-group#with-chip)
Wrap each avatar with a [Chip](https://ui.nuxt.com/components/chip)
to display a chip around the avatar.



` `
### [With link](https://ui.nuxt.com/components/avatar-group#with-link)
Wrap each avatar with a [Link](https://ui.nuxt.com/components/link)
to make them clickable.
[](https://github.com/noook)
[](https://github.com/romhml)
[](https://github.com/benjamincanac)
` `
[API](https://ui.nuxt.com/components/avatar-group#api)
-------------------------------------------------------
### [Props](https://ui.nuxt.com/components/avatar-group#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `size` | `'md'` | `"md" \| "3xs" \| "2xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "2xl" \| "3xl"` |
| `max` | | `string \| number`
The maximum number of avatars to display. |
| `ui` | | `{ root?: ClassNameValue; base?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/avatar-group#slots)
| Slot | Type |
| --- | --- |
| `default` | `{}` |
[Theme](https://ui.nuxt.com/components/avatar-group#theme)
-----------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { avatarGroup: { slots: { root: 'inline-flex flex-row-reverse justify-end', base: 'relative rounded-full ring-bg first:me-0' }, variants: { size: { '3xs': { base: 'ring -me-0.5' }, '2xs': { base: 'ring -me-0.5' }, xs: { base: 'ring -me-0.5' }, sm: { base: 'ring-2 -me-1.5' }, md: { base: 'ring-2 -me-1.5' }, lg: { base: 'ring-2 -me-1.5' }, xl: { base: 'ring-3 -me-2' }, '2xl': { base: 'ring-3 -me-2' }, '3xl': { base: 'ring-3 -me-2' } } }, defaultVariants: { size: 'md' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { avatarGroup: { slots: { root: 'inline-flex flex-row-reverse justify-end', base: 'relative rounded-full ring-bg first:me-0' }, variants: { size: { '3xs': { base: 'ring -me-0.5' }, '2xs': { base: 'ring -me-0.5' }, xs: { base: 'ring -me-0.5' }, sm: { base: 'ring-2 -me-1.5' }, md: { base: 'ring-2 -me-1.5' }, lg: { base: 'ring-2 -me-1.5' }, xl: { base: 'ring-3 -me-2' }, '2xl': { base: 'ring-3 -me-2' }, '3xl': { base: 'ring-3 -me-2' } } }, defaultVariants: { size: 'md' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { avatarGroup: { slots: { root: 'inline-flex flex-row-reverse justify-end', base: 'relative rounded-full ring-bg first:me-0' }, variants: { size: { '3xs': { base: 'ring -me-0.5' }, '2xs': { base: 'ring -me-0.5' }, xs: { base: 'ring -me-0.5' }, sm: { base: 'ring-2 -me-1.5' }, md: { base: 'ring-2 -me-1.5' }, lg: { base: 'ring-2 -me-1.5' }, xl: { base: 'ring-3 -me-2' }, '2xl': { base: 'ring-3 -me-2' }, '3xl': { base: 'ring-3 -me-2' } } }, defaultVariants: { size: 'md' } } } }) ] })`
Expand code
[Avatar\
\
An img element with fallback and Nuxt Image support.](https://ui.nuxt.com/components/avatar)
[Badge\
\
A short text to represent a status or a category.](https://ui.nuxt.com/components/badge)
---
# Vue Alert Component - Nuxt UI
Alert
=====
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Alert.vue)
A callout to draw user's attention.
[Usage](https://ui.nuxt.com/components/alert#usage)
----------------------------------------------------
### [Title](https://ui.nuxt.com/components/alert#title)
Use the `title` prop to set the title of the Alert.
title
Heads up!
` `
### [Description](https://ui.nuxt.com/components/alert#description)
Use the `description` prop to set the description of the Alert.
title
description
Heads up!
You can change the primary color in your app config.
` `
### [Icon](https://ui.nuxt.com/components/alert#icon)
Use the `icon` prop to show an [Icon](https://ui.nuxt.com/components/icon)
.
icon
Heads up!
You can change the primary color in your app config.
` `
### [Avatar](https://ui.nuxt.com/components/alert#avatar)
Use the `avatar` prop to show an [Avatar](https://ui.nuxt.com/components/avatar)
.
avatar.src

Heads up!
You can change the primary color in your app config.
` `
### [Color](https://ui.nuxt.com/components/alert#color)
Use the `color` prop to change the color of the Alert.
color
neutral
Heads up!
You can change the primary color in your app config.
` `
### [Variant](https://ui.nuxt.com/components/alert#variant)
Use the `variant` prop to change the variant of the Alert.
color
neutral
variant
subtle
Heads up!
You can change the primary color in your app config.
` `
### [Close](https://ui.nuxt.com/components/alert#close)
Use the `close` prop to display a [Button](https://ui.nuxt.com/components/button)
to dismiss the Alert.
An `update:open` event will be emitted when the close button is clicked.
Heads up!
You can change the primary color in your app config.
` `
You can pass any property from the [Button](https://ui.nuxt.com/components/button)
component to customize it.
close.class
Heads up!
You can change the primary color in your app config.
` `
### [Close Icon](https://ui.nuxt.com/components/alert#close-icon)
Use the `close-icon` prop to customize the close button [Icon](https://ui.nuxt.com/components/icon)
. Defaults to `i-lucide-x`.
closeIcon
Heads up!
You can change the primary color in your app config.
` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.close` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.close` key.
### [Actions](https://ui.nuxt.com/components/alert#actions)
Use the `actions` prop to add some [Button](https://ui.nuxt.com/components/button)
actions to the Alert.
description
Heads up!
You can change the primary color in your app config.
Action 1Action 2
` `
### [Orientation](https://ui.nuxt.com/components/alert#orientation)
Use the `orientation` prop to change the orientation of the Alert.
description
orientation
horizontal
Heads up!
You can change the primary color in your app config.
Action 1Action 2
` `
[Examples](https://ui.nuxt.com/components/alert#examples)
----------------------------------------------------------
### [`class` prop](https://ui.nuxt.com/components/alert#class-prop)
Use the `class` prop to override the base styles of the Alert.
class
Heads up!
You can change the primary color in your app config.
` `
### [`ui` prop](https://ui.nuxt.com/components/alert#ui-prop)
Use the `ui` prop to override the slots styles of the Alert.
ui.icon
Heads up!
You can change the primary color in your app config.
` `
[API](https://ui.nuxt.com/components/alert#api)
------------------------------------------------
### [Props](https://ui.nuxt.com/components/alert#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `title` | | `string` |
| `description` | | `string` |
| `icon` | | `string` |
| `avatar` | | `AvatarProps`
Show properties
* `as?: any`
The element or component this component should render as. Defaults to `'span'`.
Where to display the linked URL, as the name for a browsing context. |
| `separatorIcon` | `appConfig.ui.icons.chevronRight` | `string`
The icon to use as a separator. |
| `labelKey` | `'label'` | `string`
The key used to get the label from the item. |
| `ui` | | `{ root?: ClassNameValue; list?: ClassNameValue; item?: ClassNameValue; link?: ClassNameValue; linkLeadingIcon?: ClassNameValue; ... 4 more ...; separatorIcon?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/breadcrumb#slots)
| Slot | Type |
| --- | --- |
| `item` | `{ item: BreadcrumbItem; index: number; active?: boolean \| undefined; }` |
| `item-leading` | `{ item: BreadcrumbItem; index: number; active?: boolean \| undefined; }` |
| `item-label` | `{ item: BreadcrumbItem; index: number; active?: boolean \| undefined; }` |
| `item-trailing` | `{ item: BreadcrumbItem; index: number; active?: boolean \| undefined; }` |
| `separator` | `any` |
[Theme](https://ui.nuxt.com/components/breadcrumb#theme)
---------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { breadcrumb: { slots: { root: 'relative min-w-0', list: 'flex items-center gap-1.5', item: 'flex min-w-0', link: 'group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-primary', linkLeadingIcon: 'shrink-0 size-5', linkLeadingAvatar: 'shrink-0', linkLeadingAvatarSize: '2xs', linkLabel: 'truncate', separator: 'flex', separatorIcon: 'shrink-0 size-5 text-muted' }, variants: { active: { true: { link: 'text-primary font-semibold' }, false: { link: 'text-muted font-medium' } }, disabled: { true: { link: 'cursor-not-allowed opacity-75' } }, to: { true: '' } }, compoundVariants: [ { disabled: false, active: false, to: true, class: { link: [ 'hover:text-default', 'transition-colors' ] } } ] } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { breadcrumb: { slots: { root: 'relative min-w-0', list: 'flex items-center gap-1.5', item: 'flex min-w-0', link: 'group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-primary', linkLeadingIcon: 'shrink-0 size-5', linkLeadingAvatar: 'shrink-0', linkLeadingAvatarSize: '2xs', linkLabel: 'truncate', separator: 'flex', separatorIcon: 'shrink-0 size-5 text-muted' }, variants: { active: { true: { link: 'text-primary font-semibold' }, false: { link: 'text-muted font-medium' } }, disabled: { true: { link: 'cursor-not-allowed opacity-75' } }, to: { true: '' } }, compoundVariants: [ { disabled: false, active: false, to: true, class: { link: [ 'hover:text-default', 'transition-colors' ] } } ] } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { breadcrumb: { slots: { root: 'relative min-w-0', list: 'flex items-center gap-1.5', item: 'flex min-w-0', link: 'group relative flex items-center gap-1.5 text-sm min-w-0 focus-visible:outline-primary', linkLeadingIcon: 'shrink-0 size-5', linkLeadingAvatar: 'shrink-0', linkLeadingAvatarSize: '2xs', linkLabel: 'truncate', separator: 'flex', separatorIcon: 'shrink-0 size-5 text-muted' }, variants: { active: { true: { link: 'text-primary font-semibold' }, false: { link: 'text-muted font-medium' } }, disabled: { true: { link: 'cursor-not-allowed opacity-75' } }, to: { true: '' } }, compoundVariants: [ { disabled: false, active: false, to: true, class: { link: [ 'hover:text-default', 'transition-colors' ] } } ] } } }) ] })`
Expand code
[Badge\
\
A short text to represent a status or a category.](https://ui.nuxt.com/components/badge)
[Button\
\
A button element that can act as a link or trigger an action.](https://ui.nuxt.com/components/button)
---
# Vue ButtonGroup Component - Nuxt UI
ButtonGroup
===========
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/ButtonGroup.vue)
Group multiple button-like elements together.
[Usage](https://ui.nuxt.com/components/button-group#usage)
-----------------------------------------------------------
Wrap multiple [Button](https://ui.nuxt.com/components/button)
within a ButtonGroup to group them together.
Button
` `
### [Size](https://ui.nuxt.com/components/button-group#size)
Use the `size` prop to change the size of all the buttons.
size
xl
Button
` `
### [Orientation](https://ui.nuxt.com/components/button-group#orientation)
Use the `orientation` prop to change the orientation of the buttons. Defaults to `horizontal`.
orientation
vertical
SubmitCancel
` `
[Examples](https://ui.nuxt.com/components/button-group#examples)
-----------------------------------------------------------------
### [With input](https://ui.nuxt.com/components/button-group#with-input)
You can use components like [Input](https://ui.nuxt.com/components/input)
, [InputMenu](https://ui.nuxt.com/components/input-menu)
, [Select](https://ui.nuxt.com/components/select)
[SelectMenu](https://ui.nuxt.com/components/select-menu)
, etc. within a button group.
` `
### [With tooltip](https://ui.nuxt.com/components/button-group#with-tooltip)
You can use a [Tooltip](https://ui.nuxt.com/components/tooltip)
within a button group.
` `
### [With dropdown](https://ui.nuxt.com/components/button-group#with-dropdown)
You can use a [DropdownMenu](https://ui.nuxt.com/components/dropdown-menu)
within a button group.
Settings
` `
### [With badge](https://ui.nuxt.com/components/button-group#with-badge)
You can use a [Badge](https://ui.nuxt.com/components/badge)
within a button group.
https://
` `
[API](https://ui.nuxt.com/components/button-group#api)
-------------------------------------------------------
### [Props](https://ui.nuxt.com/components/button-group#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `size` | `'md'` | `"md" \| "xs" \| "sm" \| "lg" \| "xl"` |
| `orientation` | `'horizontal'` | `"horizontal" \| "vertical"`
The orientation the buttons are laid out. |
| `ui` | | `{}` |
### [Slots](https://ui.nuxt.com/components/button-group#slots)
| Slot | Type |
| --- | --- |
| `default` | `{}` |
[Theme](https://ui.nuxt.com/components/button-group#theme)
-----------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { buttonGroup: { base: 'relative', variants: { size: { xs: '', sm: '', md: '', lg: '', xl: '' }, orientation: { horizontal: 'inline-flex -space-x-px', vertical: 'flex flex-col -space-y-px' } } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { buttonGroup: { base: 'relative', variants: { size: { xs: '', sm: '', md: '', lg: '', xl: '' }, orientation: { horizontal: 'inline-flex -space-x-px', vertical: 'flex flex-col -space-y-px' } } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { buttonGroup: { base: 'relative', variants: { size: { xs: '', sm: '', md: '', lg: '', xl: '' }, orientation: { horizontal: 'inline-flex -space-x-px', vertical: 'flex flex-col -space-y-px' } } } } }) ] })`
Expand code
[Button\
\
A button element that can act as a link or trigger an action.](https://ui.nuxt.com/components/button)
[Calendar\
\
A calendar component for selecting single dates, multiple dates or date ranges.](https://ui.nuxt.com/components/calendar)
---
# Vue Badge Component - Nuxt UI
Badge
=====
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Badge.vue)
A short text to represent a status or a category.
[Usage](https://ui.nuxt.com/components/badge#usage)
----------------------------------------------------
### [Label](https://ui.nuxt.com/components/badge#label)
Use the default slot to set the label of the Badge.
Badge
` Badge `
You can achieve the same result by using the `label` prop.
label
Badge
` `
### [Color](https://ui.nuxt.com/components/badge#color)
Use the `color` prop to change the color of the Badge.
color
neutral
Badge
` Badge `
### [Variant](https://ui.nuxt.com/components/badge#variant)
Use the `variant` props to change the variant of the Badge.
color
neutral
variant
outline
Badge
` Badge `
### [Size](https://ui.nuxt.com/components/badge#size)
Use the `size` prop to change the size of the Badge.
size
xl
Badge
` Badge `
### [Icon](https://ui.nuxt.com/components/badge#icon)
Use the `icon` prop to show an [Icon](https://ui.nuxt.com/components/icon)
inside the Badge.
icon
size
md
color
primary
variant
solid
Badge
` Badge `
Use the `leading` and `trailing` props to set the icon position or the `leading-icon` and `trailing-icon` props to set a different icon for each position.
trailingIcon
size
md
Badge
` Badge `
### [Avatar](https://ui.nuxt.com/components/badge#avatar)
Use the `avatar` prop to show an [Avatar](https://ui.nuxt.com/components/avatar)
inside the Badge.
avatar.src
size
md
color
neutral
variant
outline
 Badge
` Badge `
[Examples](https://ui.nuxt.com/components/badge#examples)
----------------------------------------------------------
### [`class` prop](https://ui.nuxt.com/components/badge#class-prop)
Use the `class` prop to override the base styles of the Badge.
class
Badge
` Badge `
[API](https://ui.nuxt.com/components/badge#api)
------------------------------------------------
### [Props](https://ui.nuxt.com/components/badge#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'span'` | `any`
The element or component this component should render as. |
| `variant` | `'outline'` | `"solid" \| "outline" \| "soft" \| "subtle"` |
| `ui` | | `{ root?: ClassNameValue; header?: ClassNameValue; body?: ClassNameValue; footer?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/card#slots)
| Slot | Type |
| --- | --- |
| `header` | `{}` |
| `default` | `{}` |
| `footer` | `{}` |
[Theme](https://ui.nuxt.com/components/card#theme)
---------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { card: { slots: { root: 'rounded-lg', header: 'p-4 sm:px-6', body: 'p-4 sm:p-6', footer: 'p-4 sm:px-6' }, variants: { variant: { solid: { root: 'bg-inverted text-inverted' }, outline: { root: 'bg-default ring ring-default divide-y divide-default' }, soft: { root: 'bg-elevated/50 divide-y divide-default' }, subtle: { root: 'bg-elevated/50 ring ring-default divide-y divide-default' } } }, defaultVariants: { variant: 'outline' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { card: { slots: { root: 'rounded-lg', header: 'p-4 sm:px-6', body: 'p-4 sm:p-6', footer: 'p-4 sm:px-6' }, variants: { variant: { solid: { root: 'bg-inverted text-inverted' }, outline: { root: 'bg-default ring ring-default divide-y divide-default' }, soft: { root: 'bg-elevated/50 divide-y divide-default' }, subtle: { root: 'bg-elevated/50 ring ring-default divide-y divide-default' } } }, defaultVariants: { variant: 'outline' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { card: { slots: { root: 'rounded-lg', header: 'p-4 sm:px-6', body: 'p-4 sm:p-6', footer: 'p-4 sm:px-6' }, variants: { variant: { solid: { root: 'bg-inverted text-inverted' }, outline: { root: 'bg-default ring ring-default divide-y divide-default' }, soft: { root: 'bg-elevated/50 divide-y divide-default' }, subtle: { root: 'bg-elevated/50 ring ring-default divide-y divide-default' } } }, defaultVariants: { variant: 'outline' } } } }) ] })`
Expand code
[Calendar\
\
A calendar component for selecting single dates, multiple dates or date ranges.](https://ui.nuxt.com/components/calendar)
[Carousel\
\
A carousel with motion and swipe built using Embla.](https://ui.nuxt.com/components/carousel)
---
# Vue Button Component - Nuxt UI
Button
======
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Button.vue)
A button element that can act as a link or trigger an action.
[Usage](https://ui.nuxt.com/components/button#usage)
-----------------------------------------------------
### [Label](https://ui.nuxt.com/components/button#label)
Use the default slot to set the label of the Button.
Button
` Button `
You can achieve the same result by using the `label` prop.
label
Button
` `
### [Color](https://ui.nuxt.com/components/button#color)
Use the `color` prop to change the color of the Button.
color
neutral
Button
` Button `
### [Variant](https://ui.nuxt.com/components/button#variant)
Use the `variant` prop to change the variant of the Button.
color
neutral
variant
outline
Button
` Button `
### [Size](https://ui.nuxt.com/components/button#size)
Use the `size` prop to change the size of the Button.
size
xl
Button
` Button `
### [Icon](https://ui.nuxt.com/components/button#icon)
Use the `icon` prop to show an [Icon](https://ui.nuxt.com/components/icon)
inside the Button.
icon
size
md
color
primary
variant
solid
Button
` Button `
Use the `leading` and `trailing` props to set the icon position or the `leading-icon` and `trailing-icon` props to set a different icon for each position.
trailingIcon
size
md
Button
` Button `
The `label` as prop or slot is optional so you can use the Button as an icon-only button.
icon
size
md
color
primary
variant
solid
` `
### [Avatar](https://ui.nuxt.com/components/button#avatar)
Use the `avatar` prop to show an [Avatar](https://ui.nuxt.com/components/avatar)
inside the Button.
avatar.src
size
md
color
neutral
variant
outline
 Button
` Button `
The `label` as prop or slot is optional so you can use the Button as an avatar-only button.
avatar.src
size
md
color
neutral
variant
outline

` `
### [Link](https://ui.nuxt.com/components/button#link)
You can pass any property from the [Link](https://ui.nuxt.com/components/link#props)
component such as `to`, `target`, etc.
to
[Button](https://github.com/nuxt/ui)
` Button `
When the Button is a link or when using the `active` prop, you can use the `active-color` and `active-variant` props to customize the active state.
active
true
activeColor
primary
activeVariant
solid
Button
` Button `
You can also use the `active-class` and `inactive-class` props to customize the active state.
active
true
activeClass
inactiveClass
Button
` Button `
You can configure these styles globally in your `app.config.ts` file under the `ui.button.variants.active` key.
`export default defineAppConfig({ ui: { button: { variants: { active: { true: { base: 'font-bold' } } } } } })`
### [Loading](https://ui.nuxt.com/components/button#loading)
Use the `loading` prop to show a loading icon and disable the Button.
loading
true
trailing
false
Button
` Button `
Use the `loading-auto` prop to show the loading icon automatically while the `@click` promise is pending.
Button
` Button `
This also works with the [Form](https://ui.nuxt.com/components/form)
component.
Full name
Submit
` Submit `
### [Loading Icon](https://ui.nuxt.com/components/button#loading-icon)
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.
loading
true
loadingIcon
Button
` Button `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.loading` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.loading` key.
### [Disabled](https://ui.nuxt.com/components/button#disabled)
Use the `disabled` prop to disable the Button.
disabled
true
Button
` Button `
[Examples](https://ui.nuxt.com/components/button#examples)
-----------------------------------------------------------
### [`class` prop](https://ui.nuxt.com/components/button#class-prop)
Use the `class` prop to override the base styles of the Button.
class
Button
` Button `
### [`ui` prop](https://ui.nuxt.com/components/button#ui-prop)
Use the `ui` prop to override the slots styles of the Button.
ui.leadingIcon
Button
` Button `
[API](https://ui.nuxt.com/components/button#api)
-------------------------------------------------
### [Props](https://ui.nuxt.com/components/button#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'button'` | `any`
When `true`, the icon will be displayed on the left side. |
| `leadingIcon` | | `string`
Display an icon on the left side. |
| `trailing` | | `boolean`
When `true`, the icon will be displayed on the right side. |
| `trailingIcon` | | `string`
Display an icon on the right side. |
| `loading` | | `boolean`
When `true`, the loading icon will be displayed. |
| `loadingIcon` | `appConfig.ui.icons.loading` | `string`
The icon when the `loading` prop is `true`. |
| `to` | | `string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`
Route Location the link should navigate to when clicked on.
Show properties
* `name?: RouteRecordNameGeneric`
* `params?: RouteParamsRawGeneric`
* `path?: undefined`
A relative path to the current location. This property should be removed
* `query?: LocationQueryRaw`
* `hash?: string`
* `force?: boolean`
Triggers the navigation even if the location is the same as the current one. Note this will also add a new entry to the history unless `replace: true` is passed.
* `state?: HistoryState`
State to save using the History API. This cannot contain any reactive values and some primitives like Symbols are forbidden. More info at [https://developer.mozilla.org/en-US/docs/Web/API/History/state](https://developer.mozilla.org/en-US/docs/Web/API/History/state)
* `path: string`
A relative path to the current location. This property should be removed
* `query?: LocationQueryRaw`
* `hash?: string`
* `force?: boolean`
Triggers the navigation even if the location is the same as the current one. Note this will also add a new entry to the history unless `replace: true` is passed.
* `state?: HistoryState`
State to save using the History API. This cannot contain any reactive values and some primitives like Symbols are forbidden. More info at [https://developer.mozilla.org/en-US/docs/Web/API/History/state](https://developer.mozilla.org/en-US/docs/Web/API/History/state) |
| `type` | `'button'` | `"reset" \| "submit" \| "button"`
The type of the button when not a link. |
| `disabled` | | `boolean` |
| `active` | `undefined` | `boolean`
Force the link to be active independent of the current route. |
| `target` | | `null \| "_blank" \| "_parent" \| "_self" \| "_top" \| string & {}`
The position of the chip. |
| `inset` | `false` | `boolean`
When `true`, keep the chip inside the component for rounded elements. |
| `standalone` | `false` | `boolean`
When `true`, render the chip relatively to the parent. |
| `show` | `true` | `boolean` |
| `ui` | | `{ root?: ClassNameValue; base?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/chip#slots)
| Slot | Type |
| --- | --- |
| `default` | `{}` |
| `content` | `{}` |
[Theme](https://ui.nuxt.com/components/chip#theme)
---------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { chip: { slots: { root: 'relative inline-flex items-center justify-center shrink-0', base: 'rounded-full ring ring-bg flex items-center justify-center text-inverted font-medium whitespace-nowrap' }, variants: { color: { primary: 'bg-primary', secondary: 'bg-secondary', success: 'bg-success', info: 'bg-info', warning: 'bg-warning', error: 'bg-error', neutral: 'bg-inverted' }, size: { '3xs': 'h-[4px] min-w-[4px] text-[4px]', '2xs': 'h-[5px] min-w-[5px] text-[5px]', xs: 'h-[6px] min-w-[6px] text-[6px]', sm: 'h-[7px] min-w-[7px] text-[7px]', md: 'h-[8px] min-w-[8px] text-[8px]', lg: 'h-[9px] min-w-[9px] text-[9px]', xl: 'h-[10px] min-w-[10px] text-[10px]', '2xl': 'h-[11px] min-w-[11px] text-[11px]', '3xl': 'h-[12px] min-w-[12px] text-[12px]' }, position: { 'top-right': 'top-0 right-0', 'bottom-right': 'bottom-0 right-0', 'top-left': 'top-0 left-0', 'bottom-left': 'bottom-0 left-0' }, inset: { false: '' }, standalone: { false: 'absolute' } }, compoundVariants: [ { position: 'top-right', inset: false, class: '-translate-y-1/2 translate-x-1/2 transform' }, { position: 'bottom-right', inset: false, class: 'translate-y-1/2 translate-x-1/2 transform' }, { position: 'top-left', inset: false, class: '-translate-y-1/2 -translate-x-1/2 transform' }, { position: 'bottom-left', inset: false, class: 'translate-y-1/2 -translate-x-1/2 transform' } ], defaultVariants: { size: 'md', color: 'primary', position: 'top-right' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { chip: { slots: { root: 'relative inline-flex items-center justify-center shrink-0', base: 'rounded-full ring ring-bg flex items-center justify-center text-inverted font-medium whitespace-nowrap' }, variants: { color: { primary: 'bg-primary', secondary: 'bg-secondary', success: 'bg-success', info: 'bg-info', warning: 'bg-warning', error: 'bg-error', neutral: 'bg-inverted' }, size: { '3xs': 'h-[4px] min-w-[4px] text-[4px]', '2xs': 'h-[5px] min-w-[5px] text-[5px]', xs: 'h-[6px] min-w-[6px] text-[6px]', sm: 'h-[7px] min-w-[7px] text-[7px]', md: 'h-[8px] min-w-[8px] text-[8px]', lg: 'h-[9px] min-w-[9px] text-[9px]', xl: 'h-[10px] min-w-[10px] text-[10px]', '2xl': 'h-[11px] min-w-[11px] text-[11px]', '3xl': 'h-[12px] min-w-[12px] text-[12px]' }, position: { 'top-right': 'top-0 right-0', 'bottom-right': 'bottom-0 right-0', 'top-left': 'top-0 left-0', 'bottom-left': 'bottom-0 left-0' }, inset: { false: '' }, standalone: { false: 'absolute' } }, compoundVariants: [ { position: 'top-right', inset: false, class: '-translate-y-1/2 translate-x-1/2 transform' }, { position: 'bottom-right', inset: false, class: 'translate-y-1/2 translate-x-1/2 transform' }, { position: 'top-left', inset: false, class: '-translate-y-1/2 -translate-x-1/2 transform' }, { position: 'bottom-left', inset: false, class: 'translate-y-1/2 -translate-x-1/2 transform' } ], defaultVariants: { size: 'md', color: 'primary', position: 'top-right' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { chip: { slots: { root: 'relative inline-flex items-center justify-center shrink-0', base: 'rounded-full ring ring-bg flex items-center justify-center text-inverted font-medium whitespace-nowrap' }, variants: { color: { primary: 'bg-primary', secondary: 'bg-secondary', success: 'bg-success', info: 'bg-info', warning: 'bg-warning', error: 'bg-error', neutral: 'bg-inverted' }, size: { '3xs': 'h-[4px] min-w-[4px] text-[4px]', '2xs': 'h-[5px] min-w-[5px] text-[5px]', xs: 'h-[6px] min-w-[6px] text-[6px]', sm: 'h-[7px] min-w-[7px] text-[7px]', md: 'h-[8px] min-w-[8px] text-[8px]', lg: 'h-[9px] min-w-[9px] text-[9px]', xl: 'h-[10px] min-w-[10px] text-[10px]', '2xl': 'h-[11px] min-w-[11px] text-[11px]', '3xl': 'h-[12px] min-w-[12px] text-[12px]' }, position: { 'top-right': 'top-0 right-0', 'bottom-right': 'bottom-0 right-0', 'top-left': 'top-0 left-0', 'bottom-left': 'bottom-0 left-0' }, inset: { false: '' }, standalone: { false: 'absolute' } }, compoundVariants: [ { position: 'top-right', inset: false, class: '-translate-y-1/2 translate-x-1/2 transform' }, { position: 'bottom-right', inset: false, class: 'translate-y-1/2 translate-x-1/2 transform' }, { position: 'top-left', inset: false, class: '-translate-y-1/2 -translate-x-1/2 transform' }, { position: 'bottom-left', inset: false, class: 'translate-y-1/2 -translate-x-1/2 transform' } ], defaultVariants: { size: 'md', color: 'primary', position: 'top-right' } } } }) ] })`
Expand code
[CheckboxGroup\
\
A set of checklist buttons to select multiple option from a list.](https://ui.nuxt.com/components/checkbox-group)
[Collapsible\
\
A collapsible element to toggle visibility of its content.](https://ui.nuxt.com/components/collapsible)
---
# Vue Collapsible Component - Nuxt UI
Collapsible
===========
[Collapsible](https://reka-ui.com/docs/components/collapsible)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Collapsible.vue)
A collapsible element to toggle visibility of its content.
[Usage](https://ui.nuxt.com/components/collapsible#usage)
----------------------------------------------------------
Use a [Button](https://ui.nuxt.com/components/button)
or any other component in the default slot of the Collapsible.
Then, use the `#content` slot to add the content displayed when the Collapsible is open.
Open
` `
### [Unmount](https://ui.nuxt.com/components/collapsible#unmount)
Use the `unmount-on-hide` prop to prevent the content from being unmounted when the Collapsible is collapsed. Defaults to `true`.
unmountOnHide
false
Open
` `
You can inspect the DOM to see the content being rendered.
### [Disabled](https://ui.nuxt.com/components/collapsible#disabled)
Use the `disabled` prop to disable the Collapsible.
disabled
true
Open
` `
[Examples](https://ui.nuxt.com/components/collapsible#examples)
----------------------------------------------------------------
### [Control open state](https://ui.nuxt.com/components/collapsible#control-open-state)
You can control the open state by using the `default-open` prop or the `v-model:open` directive.
Open
` `
In this example, leveraging [`defineShortcuts`](https://ui.nuxt.com/composables/define-shortcuts)
, you can toggle the Collapsible by pressing O.
This allows you to move the trigger outside of the Collapsible or remove it entirely.
### [With rotating icon](https://ui.nuxt.com/components/collapsible#with-rotating-icon)
Here is an example with a rotating icon in the Button that indicates the open state of the Collapsible.
Open
` `
[API](https://ui.nuxt.com/components/collapsible#api)
------------------------------------------------------
### [Props](https://ui.nuxt.com/components/collapsible#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `disabled` | | `boolean`
When `true`, prevents the user from interacting with the collapsible. |
| `defaultOpen` | | `boolean`
The open state of the collapsible when it is initially rendered. Use when you do not need to control its open state. |
| `open` | | `boolean`
The controlled open state of the collapsible. Can be binded with `v-model`. |
| `unmountOnHide` | `true` | `boolean`
When `true`, the element will be unmounted on closed state. |
| `ui` | | `{ root?: ClassNameValue; content?: ClassNameValue; }` |
### [Slots](https://ui.nuxt.com/components/collapsible#slots)
| Slot | Type |
| --- | --- |
| `default` | `{ open: boolean; }` |
| `content` | `{}` |
### [Emits](https://ui.nuxt.com/components/collapsible#emits)
| Event | Type |
| --- | --- |
| `update:open` | `[value: boolean]` |
[Theme](https://ui.nuxt.com/components/collapsible#theme)
----------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { collapsible: { slots: { root: '', content: 'data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { collapsible: { slots: { root: '', content: 'data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { collapsible: { slots: { root: '', content: 'data-[state=open]:animate-[collapsible-down_200ms_ease-out] data-[state=closed]:animate-[collapsible-up_200ms_ease-out] overflow-hidden' } } } }) ] })`
Expand code
[Chip\
\
An indicator of a numeric value or a state.](https://ui.nuxt.com/components/chip)
[ColorPicker\
\
A component to select a color.](https://ui.nuxt.com/components/color-picker)
---
# Migration - Nuxt UI
Migration
=========
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.
Nuxt UI v3.0 is a new major version rebuilt from the ground up, introducing a modern architecture with significant performance improvements and an enhanced developer experience. This major release includes several breaking changes alongside powerful new features and capabilities:
* **Tailwind CSS v4**: Migration from JavaScript to CSS-based configuration
* **Reka UI**: Replacing Headless UI as the underlying component library
* **Tailwind Variants**: New styling API for component variants
This guide provides step by step instructions to migrate your application from v2 to v3.
[Migrate your project](https://ui.nuxt.com/getting-started/migration#migrate-your-project)
-------------------------------------------------------------------------------------------
### [Update Tailwind CSS](https://ui.nuxt.com/getting-started/migration#update-tailwind-css)
Tailwind CSS v4 introduces significant changes to its configuration approach. The official Tailwind upgrade tool will help automate most of the migration process.
[](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3)
For a detailed walkthrough of all changes, refer to the official **Tailwind CSS v4 upgrade guide**.
1. Create a `main.css` file and import it in your `nuxt.config.ts` file:
app/assets/css/main.cssnuxt.config.ts
`@import "tailwindcss";`
`export default defineNuxtConfig({ css: ['~/assets/css/main.css'] })`
2. Run the Tailwind CSS upgrade tool:
`npx @tailwindcss/upgrade`
### [Update Nuxt UI](https://ui.nuxt.com/getting-started/migration#update-nuxt-ui)
3. Install the latest version of the package:
pnpmyarnnpmbun
`pnpm add @nuxt/ui`
`yarn add @nuxt/ui`
`npm install @nuxt/ui`
`bun add @nuxt/ui`
pnpmyarnnpmbun
`pnpm add @nuxt/ui-pro`
`yarn add @nuxt/ui-pro`
`npm install @nuxt/ui-pro`
`bun add @nuxt/ui-pro`
4. Import it in your CSS:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui";`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro";`
5. Wrap your app with the [App](https://ui.nuxt.com/components/app)
component:
5. Add the `@nuxt/ui-pro` module in your `nuxt.config.ts` file as it's no longer a layer:
nuxt.config.ts
`export default defineNuxtConfig({ - extends: ['@nuxt/ui-pro'], - modules: ['@nuxt/ui'] + modules: ['@nuxt/ui-pro'] })`
6. Wrap your app with the [App](https://ui.nuxt.com/components/app)
component:
app.vue
` `
[Changes from v2](https://ui.nuxt.com/getting-started/migration#changes-from-v2)
---------------------------------------------------------------------------------
Now that you have updated your project, you can start migrating your code. Here's a comprehensive list of all the breaking changes in Nuxt UI v3.
### [Updated design system](https://ui.nuxt.com/getting-started/migration#updated-design-system)
In Nuxt UI v2, we had a mix between a design system with `primary`, `gray`, `error` aliases and all the colors from Tailwind CSS. We've replaced it with a proper [design system](https://ui.nuxt.com/getting-started/theme#design-system)
with 7 color aliases:
| Color | Default | Description |
| --- | --- | --- |
| `primary` | `green` | Main brand color, used as the default color for components. |
| `secondary` | `blue` | Secondary color to complement the primary color. |
| `success` | `green` | Used for success states. |
| `info` | `blue` | Used for informational states. |
| `warning` | `yellow` | Used for warning states. |
| `error` | `red` | Used for form error validation states. |
| `neutral` | `slate` | Neutral color for backgrounds, text, etc. |
This change introduces several breaking changes that you need to be aware of:
* The `gray` color has been renamed to `neutral`
` - + `
You can also use the new [design tokens](https://ui.nuxt.com/getting-started/theme#neutral-palette)
to handle light and dark mode:
` - + - + `
* The `gray`, `black` and `white` in the `color` props have been removed in favor of `neutral`:
`- + - + - + `
* You can no longer use Tailwind CSS colors in the `color` props, use the new aliases instead:
`- + `
[](https://ui.nuxt.com/getting-started/theme#colors)
Learn how to extend the design system to add new color aliases.
* The color configuration in `app.config.ts` has been moved into a `colors` object:
`export default defineAppConfig({ ui: { - primary: 'green', - gray: 'cool' + colors: { + primary: 'green', + neutral: 'slate' + } } })`
### [Updated theming system](https://ui.nuxt.com/getting-started/migration#updated-theming-system)
Nuxt UI components are now styled using the [Tailwind Variants API](https://ui.nuxt.com/getting-started/theme#components-theme)
, which makes all the overrides you made using the `app.config.ts` and the `ui` prop obsolete.
* Update your [`app.config.ts`](https://ui.nuxt.com/getting-started/theme#config)
to override components with their new theme:
`export default defineAppConfig({ ui: { button: { - font: 'font-bold', - default: { - size: 'md', - color: 'primary' - } + slots: { + base: 'font-medium' + }, + defaultVariants: { + size: 'md', + color: 'primary' + } } } })`
* Update your [`ui` props](https://ui.nuxt.com/getting-started/theme#props)
to override each component's slots using their new theme:
` - + `
[](https://ui.nuxt.com/components/button#theme)
We can't detail all the changes here but you can check each component's theme in the **Theme** section.
### [Renamed components](https://ui.nuxt.com/getting-started/migration#renamed-components)
We've renamed some Nuxt UI components to align with the Reka UI naming convention:
| v2 | v3 |
| --- | --- |
| `Divider` | [`Separator`](https://ui.nuxt.com/components/separator) |
| `Dropdown` | [`DropdownMenu`](https://ui.nuxt.com/components/dropdown-menu) |
| `FormGroup` | [`FormField`](https://ui.nuxt.com/components/form-field) |
| `Range` | [`Slider`](https://ui.nuxt.com/components/slider) |
| `Toggle` | [`Switch`](https://ui.nuxt.com/components/switch) |
| `Notification` | [`Toast`](https://ui.nuxt.com/components/toast) |
| `VerticalNavigation` | [`NavigationMenu`](https://ui.nuxt.com/components/navigation-menu) with `orientation="vertical"` |
| `HorizontalNavigation` | [`NavigationMenu`](https://ui.nuxt.com/components/navigation-menu) with `orientation="horizontal"` |
Here are the Nuxt UI Pro components that have been renamed or removed:
| v1 | v3 |
| --- | --- |
| `BlogList` | [`BlogPosts`](https://ui.nuxt.com/components/blog-posts) |
| `ColorModeToggle` | [`ColorModeSwitch`](https://ui.nuxt.com/components/color-mode-switch) |
| `DashboardCard` | Removed (use [`PageCard`](https://ui.nuxt.com/components/page-card) instead) |
| `DashboardLayout` | [`DashboardGroup`](https://ui.nuxt.com/components/dashboard-group) |
| `DashboardModal` | Removed (use [`Modal`](https://ui.nuxt.com/components/modal) instead) |
| `DashboardNavbarToggle` | [`DashboardSidebarToggle`](https://ui.nuxt.com/components/dashboard-sidebar-toggle) |
| `DashboardPage` | Removed |
| `DashboardPanelContent` | Removed (use `#body` slot instead) |
| `DashboardPanelHandle` | [`DashboardResizeHandle`](https://ui.nuxt.com/components/dashboard-resize-handle) |
| `DashboardSection` | Removed (use [`PageCard`](https://ui.nuxt.com/components/page-card) instead) |
| `DashboardSidebarLinks` | Removed (use [`NavigationMenu`](https://ui.nuxt.com/components/navigation-menu) instead) |
| `DashboardSlideover` | Removed (use [`Slideover`](https://ui.nuxt.com/components/slideover) instead) |
| `FooterLinks` | Removed (use [`NavigationMenu`](https://ui.nuxt.com/components/navigation-menu) instead) |
| `HeaderLinks` | Removed (use [`NavigationMenu`](https://ui.nuxt.com/components/navigation-menu) instead) |
| `LandingCard` | Removed (use [`PageCard`](https://ui.nuxt.com/components/page-card) instead) |
| `LandingCTA` | [`PageCTA`](https://ui.nuxt.com/components/page-cta) |
| `LandingFAQ` | Removed (use [`PageAccordion`](https://ui.nuxt.com/components/page-accordion) instead) |
| `LandingGrid` | Removed (use [`PageGrid`](https://ui.nuxt.com/components/page-grid) instead) |
| `LandingHero` | Removed (use [`PageHero`](https://ui.nuxt.com/components/page-hero) instead) |
| `LandingLogos` | [`PageLogos`](https://ui.nuxt.com/components/page-logos) |
| `LandingSection` | [`PageSection`](https://ui.nuxt.com/components/page-section) |
| `LandingTestimonial` | Removed (use [`PageCard`](https://ui.nuxt.com/components/page-card#as-a-testimonial) instead) |
| `NavigationAccordion` | [`ContentNavigation`](https://ui.nuxt.com/components/content-navigation) |
| `NavigationLinks` | [`ContentNavigation`](https://ui.nuxt.com/components/content-navigation) |
| `NavigationTree` | [`ContentNavigation`](https://ui.nuxt.com/components/content-navigation) |
| `PageError` | [`Error`](https://ui.nuxt.com/components/error) |
| `PricingCard` | [`PricingPlan`](https://ui.nuxt.com/components/pricing-plan) |
| `PricingGrid` | [`PricingPlans`](https://ui.nuxt.com/components/pricing-plans) |
| `PricingSwitch` | Removed (use [`Switch`](https://ui.nuxt.com/components/switch) or [`Tabs`](https://ui.nuxt.com/components/tabs) instead) |
### [Changed components](https://ui.nuxt.com/getting-started/migration#changed-components)
In addition to the renamed components, there are lots of changes to the components API. Let's detail the most important ones:
* The `links` and `options` props have been renamed to `items` for consistency:
` - + - + `
This change affects the following components: `Breadcrumb`, `HorizontalNavigation`, `InputMenu`, `RadioGroup`, `Select`, `SelectMenu`, `VerticalNavigation`.
* The `click` field in different components has been removed in favor of the native Vue `onClick` event:
``
This change affects the `Toast` component as well as all component that have `items` links like `NavigationMenu`, `DropdownMenu`, `CommandPalette`, etc.
* The global `Modals`, `Slideovers` and `Notifications` components have been removed in favor the [App](https://ui.nuxt.com/components/app)
component:
app.vue
` + + + - - - `
* The `v-model:open` directive and `default-open` prop are now used to control visibility:
` - + `
This change affects the following components: `ContextMenu`, `Modal` and `Slideover` and enables controlling visibility for `InputMenu`, `Select`, `SelectMenu` and `Tooltip`.
* The default slot is now used for the trigger and the content goes inside the `#content` slot (you don't need to use a `v-model:open` directive with this method):
` - - + + +
+ `
This change affects the following components: `Modal`, `Popover`, `Slideover`, `Tooltip`.
* A `#header`, `#body` and `#footer` slots have been added inside the `#content` slot like the `Card` component:
` - + -
+ + -
`
This change affects the following components: `Modal`, `Slideover`.
### [Changed composables](https://ui.nuxt.com/getting-started/migration#changed-composables)
* The `useToast()` composable `timeout` prop has been renamed to `duration`:
``
* The `useModal` and `useSlideover` composables have been removed in favor of a more generic `useOverlay` composable:
Some important differences:
* The `useOverlay` composable is now used to create overlay instances
* Overlays that are opened, can be awaited for their result
* Overlays can no longer be close using `modal.close()` or `slideover.close()`, rather, they close automatically: either when a `close` event is fired explicitly from the opened component OR when the overlay closes itself (clicking on backdrop, pressing the ESC key, etc)
* To capture the return value in the parent component you must explictly emit a `close` event with the desired value
``
Props are now passed through a props attribute:
``
Closing a modal is now done through the `close` event. The `modal.open` method now returns an instance that can be used to await for the result of the modal whenever the modal is closed:
``
* * *
This page is a work in progress, we'll improve it regularly.
[Installation\
\
Learn how to install and configure Nuxt UI in your Nuxt application.](https://ui.nuxt.com/getting-started/installation/nuxt)
[Theme\
\
Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.](https://ui.nuxt.com/getting-started/theme)
---
# Vue CheckboxGroup Component - Nuxt UI
CheckboxGroup
=============
[CheckboxGroup](https://reka-ui.com/docs/components/checkbox#group-root)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/CheckboxGroup.vue)
A set of checklist buttons to select multiple option from a list.
[Usage](https://ui.nuxt.com/components/checkbox-group#usage)
-------------------------------------------------------------
Use the `v-model` directive to control the value of the CheckboxGroup or the `default-value` prop to set the initial value when you do not need to control its state.
### [Items](https://ui.nuxt.com/components/checkbox-group#items)
Use the `items` prop as an array of strings or numbers:
System
Light
Dark
` `
You can also pass an array of objects with the following properties:
* `label?: string`
* `description?: string`
* [`value?: string`](https://ui.nuxt.com/components/checkbox-group#value-key)
* `disabled?: boolean`
* `class?: any`
* `ui?: { item?: ClassNameValue, container?: ClassNameValue, base?: ClassNameValue, 'indicator'?: ClassNameValue, icon?: ClassNameValue, wrapper?: ClassNameValue, label?: ClassNameValue, description?: ClassNameValue }`
System
This is the first option.
Light
This is the second option.
Dark
This is the third option.
` `
When using objects, you need to reference the `value` property of the object in the `v-model` directive or the `default-value` prop.
### [Value Key](https://ui.nuxt.com/components/checkbox-group#value-key)
You can change the property that is used to set the value by using the `value-key` prop. Defaults to `value`.
System
This is the first option.
Light
This is the second option.
Dark
This is the third option.
` `
### [Legend](https://ui.nuxt.com/components/checkbox-group#legend)
Use the `legend` prop to set the legend of the CheckboxGroup.
legend
Theme
System
Light
Dark
` `
### [Color](https://ui.nuxt.com/components/checkbox-group#color)
Use the `color` prop to change the color of the CheckboxGroup.
color
neutral
System
Light
Dark
` `
### [Variant](https://ui.nuxt.com/components/checkbox-group#variant)
Use the `variant` prop to change the variant of the CheckboxGroup.
color
primary
variant
card
System
Light
Dark
` `
### [Size](https://ui.nuxt.com/components/checkbox-group#size)
Use the `size` prop to change the size of the CheckboxGroup.
size
xl
variant
list
System
Light
Dark
` `
### [Orientation](https://ui.nuxt.com/components/checkbox-group#orientation)
Use the `orientation` prop to change the orientation of the CheckboxGroup. Defaults to `vertical`.
orientation
horizontal
variant
list
System
Light
Dark
` `
### [Indicator](https://ui.nuxt.com/components/checkbox-group#indicator)
Use the `indicator` prop to change the position or hide the indicator. Defaults to `start`.
indicator
end
variant
card
System
Light
Dark
` `
### [Disabled](https://ui.nuxt.com/components/checkbox-group#disabled)
Use the `disabled` prop to disable the CheckboxGroup.
disabled
true
System
Light
Dark
` `
[API](https://ui.nuxt.com/components/checkbox-group#api)
---------------------------------------------------------
### [Props](https://ui.nuxt.com/components/checkbox-group#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `legend` | | `string` |
| `valueKey` | `'value'` | `string`
When `items` is an array of objects, select the field to use as the value. |
| `labelKey` | `'label'` | `string`
When `items` is an array of objects, select the field to use as the label. |
| `descriptionKey` | `'description'` | `string`
When `items` is an array of objects, select the field to use as the description. |
| `items` | | `CheckboxGroupItem[]`
The orientation the checkbox buttons are laid out. |
| `defaultValue` | | `AcceptableValue[]`
The value of the checkbox when it is initially rendered. Use when you do not need to control its value. |
| `disabled` | | `boolean`
When `true`, prevents the user from interacting with the checkboxes |
| `loop` | `false` | `boolean`
Whether keyboard navigation should loop around |
| `modelValue` | | `AcceptableValue[]`
The controlled value of the checkbox. Can be binded with v-model. |
| `name` | | `string`
The name of the field. Submitted with its owning form as part of a name/value pair. |
| `required` | | `boolean`
When `true`, indicates that the user must set the value before the owning form can be submitted. |
| `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` |
| `indicator` | `'start'` | `"start" \| "end" \| "hidden"`
Position of the indicator. |
| `icon` | `appConfig.ui.icons.check` | `string`
* `description?: ClassNameValue` |
### [Slots](https://ui.nuxt.com/components/checkbox-group#slots)
| Slot | Type |
| --- | --- |
| `legend` | `{}` |
| `label` | `{ item: CheckboxGroupItem & { id: string; }; }` |
| `description` | `{ item: CheckboxGroupItem & { id: string; }; }` |
### [Emits](https://ui.nuxt.com/components/checkbox-group#emits)
| Event | Type |
| --- | --- |
| `change` | `[payload: Event]` |
| `update:modelValue` | `[value: AcceptableValue[]]` |
[Theme](https://ui.nuxt.com/components/checkbox-group#theme)
-------------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { checkboxGroup: { slots: { root: 'relative', fieldset: 'flex gap-x-2', legend: 'mb-1 block font-medium text-default', item: '' }, variants: { orientation: { horizontal: { fieldset: 'flex-row' }, vertical: { fieldset: 'flex-col' } }, color: { primary: {}, secondary: {}, success: {}, info: {}, warning: {}, error: {}, neutral: {} }, variant: { list: {}, card: {}, table: { item: 'border border-muted' } }, size: { xs: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, sm: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, md: { fieldset: 'gap-y-1', legend: 'text-sm' }, lg: { fieldset: 'gap-y-1', legend: 'text-sm' }, xl: { fieldset: 'gap-y-1.5', legend: 'text-base' } }, required: { true: { legend: "after:content-['*'] after:ms-0.5 after:text-error" } } }, compoundVariants: [ { size: 'xs', variant: 'table', class: { item: 'p-2.5' } }, { size: 'sm', variant: 'table', class: { item: 'p-3' } }, { size: 'md', variant: 'table', class: { item: 'p-3.5' } }, { size: 'lg', variant: 'table', class: { item: 'p-4' } }, { size: 'xl', variant: 'table', class: { item: 'p-4.5' } }, { orientation: 'horizontal', variant: 'table', class: { item: 'first-of-type:rounded-s-lg last-of-type:rounded-e-lg', fieldset: 'gap-0 -space-x-px' } }, { orientation: 'vertical', variant: 'table', class: { item: 'first-of-type:rounded-t-lg last-of-type:rounded-b-lg', fieldset: 'gap-0 -space-y-px' } }, { color: 'primary', variant: 'table', class: { item: 'has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]' } }, { color: 'neutral', variant: 'table', class: { item: 'has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]' } }, { variant: 'table', disabled: true, class: { item: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', variant: 'list', color: 'primary' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { checkboxGroup: { slots: { root: 'relative', fieldset: 'flex gap-x-2', legend: 'mb-1 block font-medium text-default', item: '' }, variants: { orientation: { horizontal: { fieldset: 'flex-row' }, vertical: { fieldset: 'flex-col' } }, color: { primary: {}, secondary: {}, success: {}, info: {}, warning: {}, error: {}, neutral: {} }, variant: { list: {}, card: {}, table: { item: 'border border-muted' } }, size: { xs: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, sm: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, md: { fieldset: 'gap-y-1', legend: 'text-sm' }, lg: { fieldset: 'gap-y-1', legend: 'text-sm' }, xl: { fieldset: 'gap-y-1.5', legend: 'text-base' } }, required: { true: { legend: "after:content-['*'] after:ms-0.5 after:text-error" } } }, compoundVariants: [ { size: 'xs', variant: 'table', class: { item: 'p-2.5' } }, { size: 'sm', variant: 'table', class: { item: 'p-3' } }, { size: 'md', variant: 'table', class: { item: 'p-3.5' } }, { size: 'lg', variant: 'table', class: { item: 'p-4' } }, { size: 'xl', variant: 'table', class: { item: 'p-4.5' } }, { orientation: 'horizontal', variant: 'table', class: { item: 'first-of-type:rounded-s-lg last-of-type:rounded-e-lg', fieldset: 'gap-0 -space-x-px' } }, { orientation: 'vertical', variant: 'table', class: { item: 'first-of-type:rounded-t-lg last-of-type:rounded-b-lg', fieldset: 'gap-0 -space-y-px' } }, { color: 'primary', variant: 'table', class: { item: 'has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]' } }, { color: 'neutral', variant: 'table', class: { item: 'has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]' } }, { variant: 'table', disabled: true, class: { item: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', variant: 'list', color: 'primary' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { checkboxGroup: { slots: { root: 'relative', fieldset: 'flex gap-x-2', legend: 'mb-1 block font-medium text-default', item: '' }, variants: { orientation: { horizontal: { fieldset: 'flex-row' }, vertical: { fieldset: 'flex-col' } }, color: { primary: {}, secondary: {}, success: {}, info: {}, warning: {}, error: {}, neutral: {} }, variant: { list: {}, card: {}, table: { item: 'border border-muted' } }, size: { xs: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, sm: { fieldset: 'gap-y-0.5', legend: 'text-xs' }, md: { fieldset: 'gap-y-1', legend: 'text-sm' }, lg: { fieldset: 'gap-y-1', legend: 'text-sm' }, xl: { fieldset: 'gap-y-1.5', legend: 'text-base' } }, required: { true: { legend: "after:content-['*'] after:ms-0.5 after:text-error" } } }, compoundVariants: [ { size: 'xs', variant: 'table', class: { item: 'p-2.5' } }, { size: 'sm', variant: 'table', class: { item: 'p-3' } }, { size: 'md', variant: 'table', class: { item: 'p-3.5' } }, { size: 'lg', variant: 'table', class: { item: 'p-4' } }, { size: 'xl', variant: 'table', class: { item: 'p-4.5' } }, { orientation: 'horizontal', variant: 'table', class: { item: 'first-of-type:rounded-s-lg last-of-type:rounded-e-lg', fieldset: 'gap-0 -space-x-px' } }, { orientation: 'vertical', variant: 'table', class: { item: 'first-of-type:rounded-t-lg last-of-type:rounded-b-lg', fieldset: 'gap-0 -space-y-px' } }, { color: 'primary', variant: 'table', class: { item: 'has-data-[state=checked]:bg-primary/10 has-data-[state=checked]:border-primary/50 has-data-[state=checked]:z-[1]' } }, { color: 'neutral', variant: 'table', class: { item: 'has-data-[state=checked]:bg-elevated has-data-[state=checked]:border-inverted/50 has-data-[state=checked]:z-[1]' } }, { variant: 'table', disabled: true, class: { item: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', variant: 'list', color: 'primary' } } } }) ] })`
Expand code
[](https://github.com/nuxt/ui/blob/v3/src/theme/checkbox-group.ts "Compound variants")
Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub.
[Checkbox\
\
An input element to toggle between checked and unchecked states.](https://ui.nuxt.com/components/checkbox)
[Chip\
\
An indicator of a numeric value or a state.](https://ui.nuxt.com/components/chip)
---
# License - Nuxt UI Pro
LicensePRO
==========
Nuxt UI Pro is free in development, but you need a license to build your app in production.
The license you bought or will buy is valid for both Nuxt UI Pro v1 and v3, this is a **free update**.
[Plans](https://ui.nuxt.com/getting-started/license#plans)
-----------------------------------------------------------
You can choose between **Solo**, **Startup** and **Organization** plans, they all provide the same features and give you a license key required to build your apps.
The only difference is the number of developers that can be invited to the private GitHub repository.
[](https://nuxt.lemonsqueezy.com/buy/057dacb2-87ba-4dc1-9256-59ee5b3bd394)
Solo
Tailored for indie hackers, freelancers and solo founders.
[](https://nuxt.lemonsqueezy.com/buy/2e042a33-7e76-4dda-bd68-e353c182e571)
Startup
Best suited for small teams, startups and agencies with up to 5 developers.
[](https://nuxt.lemonsqueezy.com/buy/2979099c-b7a0-4ba1-90e0-a0d60509b92d)
Organization
Ideal for larger teams and organizations with up to 20 developers.
Once purchased, you will receive an email with a license key to activate. To activate your license, enter your license key and your GitHub username. This will invite you to the private GitHub repository as well as activating your license to build your app in production.
[Activate my license](https://ui.nuxt.com/pro/activate)
[Build](https://ui.nuxt.com/getting-started/license#build)
-----------------------------------------------------------
### [Local](https://ui.nuxt.com/getting-started/license#local)
To build your app locally, you can use your license key in your `.env` file:
.env
`NUXT_UI_PRO_LICENSE=`
If you have multiple projects on your machine, you can also add it to your `~/.nuxtrc`:
~/.nuxtrc
`uiPro.license=`
Never commit your license key if your project is open source, it will be exposed to the public.
### [Hosting providers](https://ui.nuxt.com/getting-started/license#hosting-providers)
When deploying your app on Netlify, Vercel, [NuxtHub](https://hub.nuxt.com/)
or any other hosting provider, you need to set the `NUXT_UI_PRO_LICENSE` environment variable to your license key. This process is different depending on the provider but here is a quick guide for the most common ones:
* [Netlify](https://docs.netlify.com/environment-variables/overview)
* [Vercel](https://vercel.com/docs/projects/environment-variables)
[](https://hub.nuxt.com/)
The `NUXT_UI_PRO_LICENSE` variable is suggested when deploying one of our templates on **NuxtHub**.
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
[Theme\
\
Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.](https://ui.nuxt.com/getting-started/theme)
---
# Vue Carousel Component - Nuxt UI
Carousel
========
[Embla](https://www.embla-carousel.com/api/)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Carousel.vue)
A carousel with motion and swipe built using Embla.
[Usage](https://ui.nuxt.com/components/carousel#usage)
-------------------------------------------------------
### [Items](https://ui.nuxt.com/components/carousel#items)
Use the `items` prop as an array and render each item using the default slot:
Use your mouse to drag the carousel horizontally on desktop.






` `
You can also pass an array of objects with the following properties:
* `class?: any`
* `ui?: { item?: ClassNameValue }`
You can control how many items are visible by using the [`basis`](https://tailwindcss.com/docs/flex-basis)
/ [`width`](https://tailwindcss.com/docs/width)
utility classes on the `item`:






` `
### [Orientation](https://ui.nuxt.com/components/carousel#orientation)
Use the `orientation` prop to change the orientation of the Progress. Defaults to `horizontal`.
Use your mouse to drag the carousel vertically on desktop.






` `
You need to specify a `height` on the container in vertical orientation.
### [Arrows](https://ui.nuxt.com/components/carousel#arrows)
Use the `arrows` prop to display prev and next buttons.






` `
### [Prev / Next](https://ui.nuxt.com/components/carousel#prev-next)
Use the `prev` and `next` props to customize the prev and next buttons with any [Button](https://ui.nuxt.com/components/button)
props.






` `
### [Prev / Next Icons](https://ui.nuxt.com/components/carousel#prev-next-icons)
Use the `prev-icon` and `next-icon` props to customize the buttons [Icon](https://ui.nuxt.com/components/icon)
. Defaults to `i-lucide-arrow-left` / `i-lucide-arrow-right`.
prevIcon
nextIcon






` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize these icons globally in your `app.config.ts` under `ui.icons.arrowLeft` / `ui.icons.arrowRight` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize these icons globally in your `vite.config.ts` under `ui.icons.arrowLeft` / `ui.icons.arrowRight` key.
### [Dots](https://ui.nuxt.com/components/carousel#dots)
Use the `dots` prop to display a list of dots to scroll to a specific slide.






` `
The number of dots is based on the number of slides displayed in the view:






` `
[Plugins](https://ui.nuxt.com/components/carousel#plugins)
-----------------------------------------------------------
The Carousel component implements the official [Embla Carousel plugins](https://www.embla-carousel.com/plugins/)
.
### [Autoplay](https://ui.nuxt.com/components/carousel#autoplay)
This plugin is used to extend Embla Carousel with **autoplay** functionality.
Use the `autoplay` prop as a boolean or an object to configure the [Autoplay plugin](https://www.embla-carousel.com/plugins/autoplay/)
.






` `
In this example, we're using the `loop` prop for an infinite carousel.
### [Auto Scroll](https://ui.nuxt.com/components/carousel#auto-scroll)
This plugin is used to extend Embla Carousel with **auto scroll** functionality.
Use the `auto-scroll` prop as a boolean or an object to configure the [Auto Scroll plugin](https://www.embla-carousel.com/plugins/auto-scroll/)
.






` `
In this example, we're using the `loop` prop for an infinite carousel.
### [Auto Height](https://ui.nuxt.com/components/carousel#auto-height)
This plugin is used to extend Embla Carousel with **auto height** functionality. It changes the height of the carousel container to fit the height of the highest slide in view.
Use the `auto-height` prop as a boolean or an object to configure the [Auto Height plugin](https://www.embla-carousel.com/plugins/auto-height/)
.






` `
In this example, we add the `transition-[height]` class on the container to animate the height change.
### [Class Names](https://ui.nuxt.com/components/carousel#class-names)
Class Names is a **class name toggle** utility plugin for Embla Carousel that enables you to automate the toggling of class names on your carousel.
Use the `class-names` prop as a boolean or an object to configure the [Class Names plugin](https://www.embla-carousel.com/plugins/class-names/)
.






` `
In this example, we add the `transition-opacity [&:not(.is-snapped)]:opacity-10` classes on the `item` to animate the opacity change.
### [Fade](https://ui.nuxt.com/components/carousel#fade)
This plugin is used to replace the Embla Carousel scroll functionality with **fade transitions**.
Use the `fade` prop as a boolean or an object to configure the [Fade plugin](https://www.embla-carousel.com/plugins/fade/)
.






` `
### [Wheel Gestures](https://ui.nuxt.com/components/carousel#wheel-gestures)
This plugin is used to extend Embla Carousel with the ability to **use the mouse/trackpad wheel** to navigate the carousel.
Use the `wheel-gestures` prop as a boolean or an object to configure the [Wheel Gestures plugin](https://www.embla-carousel.com/plugins/wheel-gestures/)
.
Use your mouse wheel to scroll the carousel.






` `
[Examples](https://ui.nuxt.com/components/carousel#examples)
-------------------------------------------------------------
### [With thumbnails](https://ui.nuxt.com/components/carousel#with-thumbnails)
You can use the [`emblaApi`](https://ui.nuxt.com/components/carousel#expose)
function [scrollTo](https://www.embla-carousel.com/api/methods/#scrollto)
to display thumbnails under the carousel that allows you to navigate to a specific slide.












`
The element or component this component should render as. |
### [Slots](https://ui.nuxt.com/components/container#slots)
| Slot | Type |
| --- | --- |
| `default` | `{}` |
[Theme](https://ui.nuxt.com/components/container#theme)
--------------------------------------------------------
app.config.ts
`export default defineAppConfig({ ui: { container: { base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8' } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { container: { base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8' } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { container: { base: 'w-full max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8' } } }) ] })`
Expand code
[CommandPalette\
\
A command palette with full-text search powered by Fuse.js for efficient fuzzy matching.](https://ui.nuxt.com/components/command-palette)
[ContextMenu\
\
A menu to display actions when right-clicking on an element.](https://ui.nuxt.com/components/context-menu)
---
# Meet the Team - Nuxt UI
Meet the Team
=============
The development of Nuxt UI is led by a community of developers from all over the world.

Benjamin Canac
Bordeaux, France
[](https://x.com/benjamincanac)
[](https://bsky.app/profile/benjamincanac.dev)
[](https://github.com/benjamincanac)
[Sponsor](https://github.com/sponsors/benjamincanac)

Hugo Richard
Nice, France
[](https://www.instagram.com/hugo.rcd_)
[](https://x.com/HugoRCD__)
[](https://www.linkedin.com/in/hugorcd)
[](https://bsky.app/profile/hrcd.fr)
[](https://github.com/HugoRCD)
[](https://hrcd.fr/)
[Sponsor](https://github.com/sponsors/HugoRCD)

Romain Hamel
France
[](https://www.linkedin.com/in/romhml)
[](https://bsky.app/profile/rohm.bsky.social)
[](https://github.com/romhml)
[Sponsor](https://github.com/sponsors/romhml)

Sandro Circi
Roma, Italy
[](https://bsky.app/profile/sandros94.com)
[](https://www.youtube.com/@sandros94)
[](https://twitch.tv/sandros94)
[](https://github.com/sandros94)
[](https://s94.dev/)
[Sponsor](https://github.com/sponsors/sandros94)

Eugen Istoc
Atlanta, Washington DC
[](https://x.com/eugenistoc)
[](https://github.com/genu)
[](http://www.eugenistoc.com/)
[Sponsor](https://github.com/sponsors/genu)
* * *

atinux
[](https://github.com/atinux)

smarroufin
[](https://github.com/smarroufin)

Haythamasalama
[](https://github.com/Haythamasalama)

danielroe
[](https://github.com/danielroe)

hywax
[](https://github.com/hywax)

malik-jouda
[](https://github.com/malik-jouda)

connerblanton
[](https://github.com/connerblanton)

maximepvrt
[](https://github.com/maximepvrt)

antfu
[](https://github.com/antfu)

noook
[](https://github.com/noook)

rdjanuar
[](https://github.com/rdjanuar)

larbish
[](https://github.com/larbish)

eduayme
[](https://github.com/eduayme)

farnabaz
[](https://github.com/farnabaz)

ivanmaxlogiudice
[](https://github.com/ivanmaxlogiudice)

KeJunMao
[](https://github.com/KeJunMao)

ineshbose
[](https://github.com/ineshbose)

DarkGhostHunter
[](https://github.com/DarkGhostHunter)

J-Michalek
[](https://github.com/J-Michalek)

Silver343
[](https://github.com/Silver343)

zAlweNy26
[](https://github.com/zAlweNy26)

maxsteinwand
[](https://github.com/maxsteinwand)

MuhammadM1998
[](https://github.com/MuhammadM1998)

Akryum
[](https://github.com/Akryum)
---
# Theme - Nuxt UI
Theme
=====
Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.
[Tailwind CSS](https://ui.nuxt.com/getting-started/theme#tailwind-css)
-----------------------------------------------------------------------
Nuxt UI uses Tailwind CSS v4, you can read the official [upgrade guide](https://tailwindcss.com/docs/upgrade-guide#changes-from-v3)
to learn about all the breaking changes.
### [`@theme`](https://ui.nuxt.com/getting-started/theme#theme)
Tailwind CSS v4 takes a CSS-first configuration approach, you now customize your theme with CSS variables inside a [`@theme`](https://tailwindcss.com/docs/functions-and-directives#theme-directive)
directive to define your project's custom design tokens, like fonts, colors, and breakpoints:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; @theme static { --font-sans: 'Public Sans', sans-serif; --breakpoint-3xl: 1920px; --color-green-50: #EFFDF5; --color-green-100: #D9FBE8; --color-green-200: #B3F5D1; --color-green-300: #75EDAE; --color-green-400: #00DC82; --color-green-500: #00C16A; --color-green-600: #00A155; --color-green-700: #007F45; --color-green-800: #016538; --color-green-900: #0A5331; --color-green-950: #052E16; }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; @theme static { --font-sans: 'Public Sans', sans-serif; --breakpoint-3xl: 1920px; --color-green-50: #EFFDF5; --color-green-100: #D9FBE8; --color-green-200: #B3F5D1; --color-green-300: #75EDAE; --color-green-400: #00DC82; --color-green-500: #00C16A; --color-green-600: #00A155; --color-green-700: #007F45; --color-green-800: #016538; --color-green-900: #0A5331; --color-green-950: #052E16; }`
The `@theme` directive tells Tailwind to make new utilities and variants available based on these variables. It's the equivalent of the `theme.extend` key in Tailwind CSS v3 `tailwind.config.ts` file.
[](https://tailwindcss.com/docs/theme)
Learn more about customizing your theme in the theme variables documentation.
### [`@source`](https://ui.nuxt.com/getting-started/theme#source)
You can use the [`@source` directive](https://tailwindcss.com/docs/functions-and-directives#source-directive)
to explicitly specify source files that aren't picked up by Tailwind's automatic content detection:
This can be useful when writing Tailwind CSS classes in markdown files with [`@nuxt/content`](https://github.com/nuxt/content)
for example:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; @source "../../../content"; /* Use this if you're not using compatibilityVersion: 4: https://nuxt.com/docs/getting-started/upgrade#opting-in-to-nuxt-4 */ @source "../../content";`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; @source "../../../content"; /* Use this if you're not using compatibilityVersion: 4: https://nuxt.com/docs/getting-started/upgrade#opting-in-to-nuxt-4 */ @source "../../content";`
[](https://tailwindcss.com/docs/detecting-classes-in-source-files)
Learn more about automatic content detection in the detecting classes in source files documentation.
[Design system](https://ui.nuxt.com/getting-started/theme#design-system)
-------------------------------------------------------------------------
Nuxt UI extends Tailwind CSS's theming capabilities, providing a flexible design system with pre-configured color aliases based on [Tailwind CSS colors](https://tailwindcss.com/docs/customizing-colors#color-palette-reference)
. This allows for easy customization and quick adaptation of the UI to your brand's aesthetic.
| Color | Default | Description |
| --- | --- | --- |
| `primary` | `green` | Main brand color, used as the default color for components. |
| `secondary` | `blue` | Secondary color to complement the primary color. |
| `success` | `green` | Used for success states. |
| `info` | `blue` | Used for informational states. |
| `warning` | `yellow` | Used for warning states. |
| `error` | `red` | Used for form error validation states. |
| `neutral` | `slate` | Neutral color for backgrounds, text, etc. |
These colors are used to style the components but also to generate the `color` props:
color
primary
Button
` Button `
Try the theme picker in the header above to change `primary` and `neutral` colors.
### [Configuration](https://ui.nuxt.com/getting-started/theme#configuration)
You can configure these color aliases at runtime in your [`app.config.ts`](https://nuxt.com/docs/guide/directory-structure/app-config#app-config-file)
file under the `ui.colors` key, allowing for dynamic theme customization without requiring an application rebuild:
app.config.ts
`export default defineAppConfig({ ui: { colors: { primary: 'blue', neutral: 'zinc' } } })`
You can configure these color aliases at runtime in your `vite.config.ts` file under the `ui.colors` key:
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { colors: { primary: 'blue', neutral: 'zinc' } } }) ] })`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { colors: { primary: 'blue', neutral: 'zinc' } } }) ] })`
When configuring your theme colors, you must use either color names from the [default Tailwind palette](https://tailwindcss.com/docs/colors)
(like 'blue', 'green', etc.) or reference custom colors that you've previously defined in your [CSS file](https://ui.nuxt.com/getting-started/theme#theme)
.
### [Extend colors](https://ui.nuxt.com/getting-started/theme#extend-colors)
You can add you own dynamic color aliases in your `app.config.ts`, you just have to make sure to define them in the [`ui.theme.colors`](https://ui.nuxt.com/getting-started/installation/nuxt#themecolors)
option in your `nuxt.config.ts` file:
app.config.ts
`export default defineAppConfig({ ui: { colors: { tertiary: 'indigo' } } })`
nuxt.config.ts
`export default defineNuxtConfig({ ui: { theme: { colors: [ 'primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error' ] } } })`
You can add you own dynamic color aliases in your `vite.config.ts`, you just have to make sure to also define them in the [`theme.colors`](https://ui.nuxt.com/getting-started/installation/vue#themecolors)
option of the `ui` plugin:
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { colors: { tertiary: 'indigo' } }, theme: { colors: [ 'primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error' ] } }) ] })`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { colors: { tertiary: 'indigo' } }, theme: { colors: [ 'primary', 'secondary', 'tertiary', 'info', 'success', 'warning', 'error' ] } }) ] })`
[CSS Variables](https://ui.nuxt.com/getting-started/theme#css-variables)
-------------------------------------------------------------------------
Nuxt UI leverages a robust system of CSS variables as design tokens to ensure consistent and flexible component styling. These tokens form the foundation of the theming system, offering smooth support for both light and dark modes.
### [Colors](https://ui.nuxt.com/getting-started/theme#colors)
Nuxt UI provides a CSS variable for each color alias you define which represent the default shade used in both light and dark modes:
LightDark
`:root { --ui-primary: var(--ui-color-primary-500); --ui-secondary: var(--ui-color-secondary-500); --ui-success: var(--ui-color-success-500); --ui-info: var(--ui-color-info-500); --ui-warning: var(--ui-color-warning-500); --ui-error: var(--ui-color-error-500); }`
`.dark { --ui-primary: var(--ui-color-primary-400); --ui-secondary: var(--ui-color-secondary-400); --ui-success: var(--ui-color-success-400); --ui-info: var(--ui-color-info-400); --ui-warning: var(--ui-color-warning-400); --ui-error: var(--ui-color-error-400); }`
These CSS variables are defined in Tailwind CSS's `@theme` so you can use them as classes:
PrimarySecondarySuccessInfoWarningError
` PrimarySecondarySuccessInfoWarningError `
This is how the `@theme` is generated for each color alias:
`@theme default { --color-primary: var(--ui-primary); --color-primary-50: var(--ui-color-primary-50); --color-primary-100: var(--ui-color-primary-100); --color-primary-200: var(--ui-color-primary-200); --color-primary-300: var(--ui-color-primary-300); --color-primary-400: var(--ui-color-primary-400); --color-primary-500: var(--ui-color-primary-500); --color-primary-600: var(--ui-color-primary-600); --color-primary-700: var(--ui-color-primary-700); --color-primary-800: var(--ui-color-primary-800); --color-primary-900: var(--ui-color-primary-900); --color-primary-950: var(--ui-color-primary-950); --color-secondary: var(--ui-secondary); --color-secondary-50: var(--ui-color-secondary-50); --color-secondary-100: var(--ui-color-secondary-100); --color-secondary-200: var(--ui-color-secondary-200); --color-secondary-300: var(--ui-color-secondary-300); --color-secondary-400: var(--ui-color-secondary-400); --color-secondary-500: var(--ui-color-secondary-500); --color-secondary-600: var(--ui-color-secondary-600); --color-secondary-700: var(--ui-color-secondary-700); --color-secondary-800: var(--ui-color-secondary-800); --color-secondary-900: var(--ui-color-secondary-900); --color-secondary-950: var(--ui-color-secondary-950); --color-success: var(--ui-success); --color-success-50: var(--ui-color-success-50); --color-success-100: var(--ui-color-success-100); --color-success-200: var(--ui-color-success-200); --color-success-300: var(--ui-color-success-300); --color-success-400: var(--ui-color-success-400); --color-success-500: var(--ui-color-success-500); --color-success-600: var(--ui-color-success-600); --color-success-700: var(--ui-color-success-700); --color-success-800: var(--ui-color-success-800); --color-success-900: var(--ui-color-success-900); --color-success-950: var(--ui-color-success-950); --color-info: var(--ui-info); --color-info-50: var(--ui-color-info-50); --color-info-100: var(--ui-color-info-100); --color-info-200: var(--ui-color-info-200); --color-info-300: var(--ui-color-info-300); --color-info-400: var(--ui-color-info-400); --color-info-500: var(--ui-color-info-500); --color-info-600: var(--ui-color-info-600); --color-info-700: var(--ui-color-info-700); --color-info-800: var(--ui-color-info-800); --color-info-900: var(--ui-color-info-900); --color-info-950: var(--ui-color-info-950); --color-warning: var(--ui-warning); --color-warning-50: var(--ui-color-warning-50); --color-warning-100: var(--ui-color-warning-100); --color-warning-200: var(--ui-color-warning-200); --color-warning-300: var(--ui-color-warning-300); --color-warning-400: var(--ui-color-warning-400); --color-warning-500: var(--ui-color-warning-500); --color-warning-600: var(--ui-color-warning-600); --color-warning-700: var(--ui-color-warning-700); --color-warning-800: var(--ui-color-warning-800); --color-warning-900: var(--ui-color-warning-900); --color-warning-950: var(--ui-color-warning-950); --color-error: var(--ui-error); --color-error-50: var(--ui-color-error-50); --color-error-100: var(--ui-color-error-100); --color-error-200: var(--ui-color-error-200); --color-error-300: var(--ui-color-error-300); --color-error-400: var(--ui-color-error-400); --color-error-500: var(--ui-color-error-500); --color-error-600: var(--ui-color-error-600); --color-error-700: var(--ui-color-error-700); --color-error-800: var(--ui-color-error-800); --color-error-900: var(--ui-color-error-900); --color-error-950: var(--ui-color-error-950); --color-neutral-50: var(--ui-color-neutral-50); --color-neutral-100: var(--ui-color-neutral-100); --color-neutral-200: var(--ui-color-neutral-200); --color-neutral-300: var(--ui-color-neutral-300); --color-neutral-400: var(--ui-color-neutral-400); --color-neutral-500: var(--ui-color-neutral-500); --color-neutral-600: var(--ui-color-neutral-600); --color-neutral-700: var(--ui-color-neutral-700); --color-neutral-800: var(--ui-color-neutral-800); --color-neutral-900: var(--ui-color-neutral-900); --color-neutral-950: var(--ui-color-neutral-950); }`
Expand code
You can change which shade is used for each color on light and dark mode in your `main.css` file:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; :root { --ui-primary: var(--ui-color-primary-700); } .dark { --ui-primary: var(--ui-color-primary-200); }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; :root { --ui-primary: var(--ui-color-primary-700); } .dark { --ui-primary: var(--ui-color-primary-200); }`
You cannot set `primary: 'black'` in your [`app.config.ts`](https://ui.nuxt.com/getting-started/theme#config)
because this color has no shade, instead you can override the primary color in your `main.css` file to create a black & white theme:
You cannot set `primary: 'black'` in your [`vite.config.ts`](https://ui.nuxt.com/getting-started/theme#config)
because this color has no shade, instead you can override the primary color in your `main.css` file to create a black & white theme:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; :root { --ui-primary: black; } .dark { --ui-primary: white; }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; :root { --ui-primary: black; } .dark { --ui-primary: white; }`
### [Neutral](https://ui.nuxt.com/getting-started/theme#neutral)
Nuxt UI provides a comprehensive set of design tokens for the `neutral` color palette, ensuring consistent and accessible UI styling across both light and dark modes. These tokens offer fine-grained control over text, background, and border colors:
LightDark
`:root { --ui-text-dimmed: var(--ui-color-neutral-400); --ui-text-muted: var(--ui-color-neutral-500); --ui-text-toned: var(--ui-color-neutral-600); --ui-text: var(--ui-color-neutral-700); --ui-text-highlighted: var(--ui-color-neutral-900); --ui-text-inverted: var(--color-white); --ui-bg: var(--color-white); --ui-bg-muted: var(--ui-color-neutral-50); --ui-bg-elevated: var(--ui-color-neutral-100); --ui-bg-accented: var(--ui-color-neutral-200); --ui-bg-inverted: var(--ui-color-neutral-900); --ui-border: var(--ui-color-neutral-200); --ui-border-muted: var(--ui-color-neutral-200); --ui-border-accented: var(--ui-color-neutral-300); --ui-border-inverted: var(--ui-color-neutral-900); }`
`.dark { --ui-text-dimmed: var(--ui-color-neutral-500); --ui-text-muted: var(--ui-color-neutral-400); --ui-text-toned: var(--ui-color-neutral-300); --ui-text: var(--ui-color-neutral-200); --ui-text-highlighted: var(--color-white); --ui-text-inverted: var(--ui-color-neutral-900); --ui-bg: var(--ui-color-neutral-900); --ui-bg-muted: var(--ui-color-neutral-800); --ui-bg-elevated: var(--ui-color-neutral-800); --ui-bg-accented: var(--ui-color-neutral-700); --ui-bg-inverted: var(--color-white); --ui-border: var(--ui-color-neutral-800); --ui-border-muted: var(--ui-color-neutral-700); --ui-border-accented: var(--ui-color-neutral-700); --ui-border-inverted: var(--color-white); }`
These CSS variables are defined in Tailwind CSS's `@theme` so you can use them as classes:
DimmedMutedTonedTextHighlightedInverted
` DimmedMutedTonedTextHighlightedInverted `
DefaultMutedElevatedAccentedInverted
`
Default
Muted
Elevated
Accented
Inverted
`
DefaultMutedAccentedInverted
`
Default
Muted
Accented
Inverted
`
This is how the `@theme` is generated for each design token:
`@theme default { --text-color-dimmed: var(--ui-text-dimmed); --text-color-muted: var(--ui-text-muted); --text-color-toned: var(--ui-text-toned); --text-color-default: var(--ui-text); --text-color-highlighted: var(--ui-text-highlighted); --text-color-inverted: var(--ui-text-inverted); --background-color-default: var(--ui-bg); --background-color-muted: var(--ui-bg-muted); --background-color-elevated: var(--ui-bg-elevated); --background-color-accented: var(--ui-bg-accented); --background-color-inverted: var(--ui-bg-inverted); --background-color-border: var(--ui-border); --border-color-default: var(--ui-border); --border-color-muted: var(--ui-border-muted); --border-color-accented: var(--ui-border-accented); --border-color-inverted: var(--ui-border-inverted); --border-color-bg: var(--ui-bg); --ring-color-default: var(--ui-border); --ring-color-muted: var(--ui-border-muted); --ring-color-accented: var(--ui-border-accented); --ring-color-inverted: var(--ui-border-inverted); --ring-color-bg: var(--ui-bg); --ring-offset-color-default: var(--ui-border); --ring-offset-color-muted: var(--ui-border-muted); --ring-offset-color-accented: var(--ui-border-accented); --ring-offset-color-inverted: var(--ui-border-inverted); --ring-offset-color-bg: var(--ui-bg); --divide-color-default: var(--ui-border); --divide-color-muted: var(--ui-border-muted); --divide-color-accented: var(--ui-border-accented); --divide-color-inverted: var(--ui-border-inverted); --divide-color-bg: var(--ui-bg); --outline-color-default: var(--ui-border); --outline-color-inverted: var(--ui-border-inverted); --stroke-color-default: var(--ui-border); --stroke-color-inverted: var(--ui-border-inverted); --fill-color-default: var(--ui-border); --fill-color-inverted: var(--ui-border-inverted); }`
Expand code
You can customize these CSS variables to tailor the appearance of your application in your `main.css` file:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; :root { --ui-bg: var(--ui-color-neutral-50); --ui-text: var(--ui-color-neutral-900); } .dark { --ui-bg: var(--ui-color-neutral-950); --ui-border: var(--ui-color-neutral-900); }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; :root { --ui-bg: var(--ui-color-neutral-50); --ui-text: var(--ui-color-neutral-900); } .dark { --ui-bg: var(--ui-color-neutral-950); --ui-border: var(--ui-color-neutral-900); }`
Nuxt UI applies a text and background color on the `` element of your app:
`body { @apply antialiased text-default bg-default scheme-light dark:scheme-dark; }`
### [Radius](https://ui.nuxt.com/getting-started/theme#radius)
Nuxt UI provides a centralized border radius system through the `--ui-radius` CSS variable.
`:root { --ui-radius: 0.25rem; }`
This CSS variable replaces Tailwind CSS's default `rounded-*` utilities so you can use the same class names:
xssmmdlgxl2xl3xl
`
xs
sm
md
lg
xl
2xl
3xl
`
This is how the `@theme` is generated for each radius value:
`@theme default { --radius-xs: calc(var(--ui-radius) * 0.5); /* 0.125rem */ --radius-sm: var(--ui-radius); /* 0.25rem */ --radius-md: calc(var(--ui-radius) * 1.5); /* 0.375rem */ --radius-lg: calc(var(--ui-radius) * 2); /* 0.5rem */ --radius-xl: calc(var(--ui-radius) * 3); /* 0.75rem */ --radius-2xl: calc(var(--ui-radius) * 4); /* 1rem */ --radius-3xl: calc(var(--ui-radius) * 6); /* 1.5rem */ }`
Expand code
You can customize the base radius value in your `main.css` file:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; :root { --ui-radius: 0.5rem; }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; :root { --ui-radius: 0.5rem; }`
Try the theme picker in the header above to change the base radius value.
### [Container](https://ui.nuxt.com/getting-started/theme#container)
Nuxt UI provides a `--ui-container` CSS variable that controls the maximum width of the [Container](https://ui.nuxt.com/components/container)
component.
`:root { --ui-container: var(--container-7xl); }`
You can customize this value in your `main.css` file to adjust container widths consistently throughout your application:
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; @theme { --container-8xl: 90rem; } :root { --ui-container: var(--container-8xl); }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; @theme { --container-8xl: 90rem; } :root { --ui-container: var(--container-8xl); }`
[Components theme](https://ui.nuxt.com/getting-started/theme#components-theme)
-------------------------------------------------------------------------------
Nuxt UI components are styled using the [Tailwind Variants](https://www.tailwind-variants.org/)
API, which provides a powerful way to create variants and manage component styles. Let's explore the key features of this API:
### [Slots](https://ui.nuxt.com/getting-started/theme#slots)
Components in Nuxt UI can have multiple `slots`, each representing a distinct HTML element or section within the component. These slots allow for flexible content insertion and styling. Let's take the [Card](https://ui.nuxt.com/components/card)
component as an example:
src/theme/card.tssrc/runtime/components/Card.vue
`export default { slots: { root: 'bg-default ring ring-default divide-y divide-default rounded-lg', header: 'p-4 sm:px-6', body: 'p-4 sm:p-6', footer: 'p-4 sm:px-6' } }`
`
`
Some components don't have slots, they are just composed of a single root element. In this case, the theme only defines the `base` slot like the [Container](https://ui.nuxt.com/components/container)
component for example:
src/theme/container.tssrc/runtime/components/Container.vue
`export default { base: 'max-w-(--ui-container) mx-auto px-4 sm:px-6 lg:px-8' }`
`
`
Components without slots don't have a [`ui` prop](https://ui.nuxt.com/getting-started/theme#ui-prop)
, only the [`class` prop](https://ui.nuxt.com/getting-started/theme#class-prop)
is available to override styles.
### [Variants](https://ui.nuxt.com/getting-started/theme#variants)
Nuxt UI components use `variants` to change the `slots` styles based on props. Here's an example of the [Avatar](https://ui.nuxt.com/components/avatar)
component:
src/theme/avatar.ts
`export default { slots: { root: 'inline-flex items-center justify-center shrink-0 select-none overflow-hidden rounded-full align-middle bg-elevated', image: 'h-full w-full rounded-[inherit] object-cover' }, variants: { size: { sm: { root: 'size-7 text-sm' }, md: { root: 'size-8 text-base' }, lg: { root: 'size-9 text-lg' } } }, defaultVariants: { size: 'md' } }`
This way, the `size` prop will apply the corresponding styles to the `root` slot:
size
lg

` `
The `defaultVariants` property specifies the default values for each variant. It determines how a component looks and behaves when no prop is provided.
These default values can be customized in your [`app.config.ts`](https://ui.nuxt.com/getting-started/theme#config)
to adjust the standard appearance of components throughout your application.
These default values can be customized in your [`vite.config.ts`](https://ui.nuxt.com/getting-started/theme#config)
to adjust the standard appearance of components throughout your application.
[Customize theme](https://ui.nuxt.com/getting-started/theme#customize-theme)
-----------------------------------------------------------------------------
You have multiple ways to customize the appearance of Nuxt UI components, you can do it for all components at once or on a per-component basis.
Tailwind Variants uses [`tailwind-merge`](https://github.com/dcastil/tailwind-merge)
under the hood to merge classes so you don't have to worry about conflicting classes.
You can explore the theme for each component in two ways:
* Check the `Theme` section in the documentation of each individual component.
* Browse the source code directly in the GitHub repository at [`v3/src/theme`](https://github.com/nuxt/ui/tree/v3/src/theme)
.
### [Config](https://ui.nuxt.com/getting-started/theme#config)
You can override the theme of components globally inside your `app.config.ts` by using the exact same structure as the theme object.
Let's say you want to change the font weight of all your buttons, you can do it like this:
app.config.ts
`export default defineAppConfig({ ui: { button: { slots: { base: 'font-bold' } } } })`
You can override the theme of components globally inside your `vite.config.ts` by using the exact same structure as the theme object.
Let's say you want to change the font weight of all your buttons, you can do it like this:
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { button: { slots: { base: 'font-bold' } } } }) ] })`
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { button: { slots: { base: 'font-bold' } } } }) ] })`
In this example, the `font-bold` class will override the default `font-medium` class on all buttons.
### [Props](https://ui.nuxt.com/getting-started/theme#props)
#### [`ui` prop](https://ui.nuxt.com/getting-started/theme#ui-prop)
You can also override a component's **slots** using the `ui` prop. This has priority over the global configuration and `variants` resolution.
trailingIcon
Button
` Button `
In this example, the `trailingIcon` slot is overwritten with `size-3` even though the `md` size variant would apply a `size-5` class to it.
#### [`class` prop](https://ui.nuxt.com/getting-started/theme#class-prop)
The `class` prop allows you to override the classes of the `root` or `base` slot. This has priority over the global configuration and `variants` resolution.
class
Button
` Button `
In this example, the `font-bold` class will override the default `font-medium` class on this button.
[Migration\
\
A comprehensive guide to migrate your application from Nuxt UI v2 to Nuxt UI v3.](https://ui.nuxt.com/getting-started/migration)
[Icons\
\
Nuxt UI integrates with Nuxt Icon to access over 200,000+ icons from Iconify.](https://ui.nuxt.com/getting-started/icons/nuxt)
---
# Icons - Nuxt UI
Icons
=====
[Iconify](https://iconify.design/)
[nuxt/icon](https://github.com/nuxt/icon)
Nuxt UI integrates with Nuxt Icon to access over 200,000+ icons from Iconify.
[](https://ui.nuxt.com/getting-started/icons/vue)
Looking for the **Vue** version?
[Usage](https://ui.nuxt.com/getting-started/icons/nuxt#usage)
--------------------------------------------------------------
Nuxt UI automatically registers the [`@nuxt/icon`](https://github.com/nuxt/icon)
module for you, so there's no additional setup required.
### [Icon Component](https://ui.nuxt.com/getting-started/icons/nuxt#icon-component)
You can use the [Icon](https://ui.nuxt.com/components/icon)
component with a `name` prop to display an icon:
name
class
` `
You can use any name from the [https://icones.js.org](https://icones.js.org/)
collection.
### [Component Props](https://ui.nuxt.com/getting-started/icons/nuxt#component-props)
Some components also have an `icon` prop to display an icon, like the [Button](https://ui.nuxt.com/components/button)
for example:
icon
Button
` Button `
[Collections](https://ui.nuxt.com/getting-started/icons/nuxt#collections)
--------------------------------------------------------------------------
### [Iconify Dataset](https://ui.nuxt.com/getting-started/icons/nuxt#iconify-dataset)
It's highly recommended to install the icon data locally with:
pnpmyarnnpm
`pnpm i @iconify-json/{collection_name}`
`yarn add @iconify-json/{collection_name}`
`npm install @iconify-json/{collection_name}`
For example, to use the `i-uil-github` icon, install it's collection with `@iconify-json/uil`. This way the icons can be served locally or from your serverless functions, which is faster and more reliable on both SSR and client-side.
[](https://github.com/nuxt/icon?tab=readme-ov-file#iconify-dataset)
Read more about this in the `@nuxt/icon` documentation.
### [Custom Local Collections](https://ui.nuxt.com/getting-started/icons/nuxt#custom-local-collections)
You can use local SVG files to create a custom Iconify collection.
For example, place your icons' SVG files under a folder of your choice, for example, `./assets/icons`:
`assets/icons ├── add.svg └── remove.svg`
In your `nuxt.config.ts`, add an item in `icon.customCollections`:
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], icon: { customCollections: [{ prefix: 'custom', dir: './assets/icons' }] } })`
Then you can use the icons like this:
` `
[](https://github.com/nuxt/icon?tab=readme-ov-file#custom-local-collections)
Read more about this in the `@nuxt/icon` documentation.
[Theme](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
--------------------------------------------------------------
You can change the default icons used by components in your `app.config.ts`:
app.config.ts
`export default defineAppConfig({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } })`
Expand code
app.config.ts
`export default defineAppConfig({ ui: { icons: { arrowUp: 'i-lucide-arrow-up', arrowDown: 'i-lucide-arrow-down', caution: 'i-lucide-circle-alert', copy: 'i-lucide-copy', copyCheck: 'i-lucide-copy-check', dark: 'i-lucide-moon', error: 'i-lucide-circle-x', eye: 'i-lucide-eye', eyeOff: 'i-lucide-eye-off', file: 'i-lucide-file-text', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', hash: 'i-lucide-hash', info: 'i-lucide-info', light: 'i-lucide-sun', menu: 'i-lucide-menu', panelClose: 'i-lucide-panel-left-close', panelOpen: 'i-lucide-panel-left-open', reload: 'i-lucide-rotate-ccw', stop: 'i-lucide-square', success: 'i-lucide-circle-check', system: 'i-lucide-monitor', tip: 'i-lucide-lightbulb', warning: 'i-lucide-triangle-alert', arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } }) ] })`
Expand code
[Theme\
\
Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.](https://ui.nuxt.com/getting-started/theme)
[Fonts\
\
Nuxt UI integrates with Nuxt Fonts to provide plug-and-play font optimization.](https://ui.nuxt.com/getting-started/fonts)
---
# Conditions Générales de Vente de Nuxt UI Pro
Conditions Générales de Vente de Nuxt UI Pro
============================================
Dernière mise à jour : 20 août 2024
[1\. Introduction](https://ui.nuxt.com/pro/terms#_1-introduction)
------------------------------------------------------------------
Les présentes conditions générales de vente (ci-après "CGV") régissent les relations contractuelles entre NuxtLabs (ci-après "nous" ou "l'Entreprise") et toute personne physique ou morale (ci-après "Client") souhaitant acquérir une licence pour le produit Nuxt UI Pro (ci-après "Produit").
[2\. Acceptation des Conditions Générales de Vente](https://ui.nuxt.com/pro/terms#_2-acceptation-des-conditions-g%C3%A9n%C3%A9rales-de-vente)
----------------------------------------------------------------------------------------------------------------------------------------------
En achetant une licence pour Nuxt UI Pro, le Client accepte sans réserve les présentes CGV. Toute condition contraire posée par le Client sera, sauf acceptation formelle et écrite de notre part, inopposable.
[3\. Description du Produit](https://ui.nuxt.com/pro/terms#_3-description-du-produit)
--------------------------------------------------------------------------------------
Nuxt UI Pro est un ensemble d'outils et de composants pour le développement d'interfaces utilisateur avec le framework Nuxt. Le produit est accessible via un paiement unique, tel que décrit sur notre [page de tarification](https://ui.nuxt.com/pro/pricing)
.
[4\. Modalités de paiement](https://ui.nuxt.com/pro/terms#_4-modalit%C3%A9s-de-paiement)
-----------------------------------------------------------------------------------------
Le paiement pour l'acquisition d'une licence Nuxt UI Pro est unique et doit être effectué en totalité au moment de l'achat. Les tarifs sont indiqués en dollars américains (USD) et n'incluent pas les taxes applicables. Le Client est responsable du paiement de toutes les taxes, droits ou autres charges imposés par les autorités fiscales compétentes.
[5\. Droit de rétractation et remboursement](https://ui.nuxt.com/pro/terms#_5-droit-de-r%C3%A9tractation-et-remboursement)
---------------------------------------------------------------------------------------------------------------------------
Le Client dispose d'un droit de rétractation de 14 jours concernant la licence Nuxt UI Pro à compter de la date d'achat. Passé ce délai, aucun remboursement ne sera effectué.
Le Figma Pro Kit étant un produit numérique fourni sous forme de fichier ZIP, aucun remboursement ne pourra être effectué après l'achat.
[6\. Propriété intellectuelle](https://ui.nuxt.com/pro/terms#_6-propri%C3%A9t%C3%A9-intellectuelle)
----------------------------------------------------------------------------------------------------
NuxtLabs reste propriétaire exclusif de tous les droits de propriété intellectuelle relatifs au Produit. La licence concédée au Client est non exclusive, non transférable, et strictement limitée à l'utilisation personnelle ou professionnelle du Produit.
[7\. Responsabilité](https://ui.nuxt.com/pro/terms#_7-responsabilit%C3%A9)
---------------------------------------------------------------------------
NuxtLabs s'engage à fournir un service de qualité, mais ne saurait être tenu responsable des dommages directs ou indirects résultant de l'utilisation du Produit. La responsabilité de NuxtLabs, en tout état de cause, sera limitée au montant payé par le Client pour l'achat du Produit.
[8\. Support technique](https://ui.nuxt.com/pro/terms#_8-support-technique)
----------------------------------------------------------------------------
Un support technique est fourni aux Clients selon les modalités spécifiées sur notre site web. Pour toute assistance, le Client peut envoyer un email à l'adresse suivante : [\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection#f98c90d4898b96b9978c818dd79a9694)
.
[9\. Modifications des CGV](https://ui.nuxt.com/pro/terms#_9-modifications-des-cgv)
------------------------------------------------------------------------------------
NuxtLabs se réserve le droit de modifier les présentes CGV à tout moment. Les modifications entreront en vigueur dès leur publication sur notre site web.
[10\. Mentions Légales](https://ui.nuxt.com/pro/terms#_10-mentions-l%C3%A9gales)
---------------------------------------------------------------------------------
* Nom de l'Entreprise : NuxtLabs
* Adresse : 10 rue Rolland 33000 Bordeaux
* Numéro d'Identification Fiscale : FR92828193722
* Contact : Vous pouvez nous contacter par email à l'adresse suivante : [\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection#026e6765636e426c777a766e6360712c616d6f)
.
[11\. Loi applicable et juridiction compétente](https://ui.nuxt.com/pro/terms#_11-loi-applicable-et-juridiction-comp%C3%A9tente)
---------------------------------------------------------------------------------------------------------------------------------
Les présentes CGV sont soumises au droit français. En cas de litige, les parties s'efforceront de résoudre le différend à l'amiable. À défaut, les tribunaux compétents seront ceux du ressort de la Cour d'appel de Paris.
---
# Icons - Nuxt UI for Vue
Icons
=====
[Iconify](https://iconify.design/)
Nuxt UI integrates with Iconify to access over 200,000+ icons.
[](https://ui.nuxt.com/getting-started/icons/nuxt)
Looking for the **Nuxt** version?
[Usage](https://ui.nuxt.com/getting-started/icons/vue#usage)
-------------------------------------------------------------
### [Icon Component](https://ui.nuxt.com/getting-started/icons/vue#icon-component)
You can use the [Icon](https://ui.nuxt.com/components/icon)
component with a `name` prop to display an icon:
name
class
` `
You can use any name from the [https://icones.js.org](https://icones.js.org/)
collection.
### [Component Props](https://ui.nuxt.com/getting-started/icons/vue#component-props)
Some components also have an `icon` prop to display an icon, like the [Button](https://ui.nuxt.com/components/button)
for example:
icon
Button
` Button `
[Theme](https://ui.nuxt.com/getting-started/icons/vue#theme)
-------------------------------------------------------------
You can change the default icons used by Nuxt UI components in your `vite.config.ts`:
app.config.ts
`export default defineAppConfig({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } })`
Expand code
app.config.ts
`export default defineAppConfig({ ui: { icons: { arrowUp: 'i-lucide-arrow-up', arrowDown: 'i-lucide-arrow-down', caution: 'i-lucide-circle-alert', copy: 'i-lucide-copy', copyCheck: 'i-lucide-copy-check', dark: 'i-lucide-moon', error: 'i-lucide-circle-x', eye: 'i-lucide-eye', eyeOff: 'i-lucide-eye-off', file: 'i-lucide-file-text', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', hash: 'i-lucide-hash', info: 'i-lucide-info', light: 'i-lucide-sun', menu: 'i-lucide-menu', panelClose: 'i-lucide-panel-left-close', panelOpen: 'i-lucide-panel-left-open', reload: 'i-lucide-rotate-ccw', stop: 'i-lucide-square', success: 'i-lucide-circle-check', system: 'i-lucide-monitor', tip: 'i-lucide-lightbulb', warning: 'i-lucide-triangle-alert', arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ ui: { icons: { arrowLeft: 'i-lucide-arrow-left', arrowRight: 'i-lucide-arrow-right', check: 'i-lucide-check', chevronDoubleLeft: 'i-lucide-chevrons-left', chevronDoubleRight: 'i-lucide-chevrons-right', chevronDown: 'i-lucide-chevron-down', chevronLeft: 'i-lucide-chevron-left', chevronRight: 'i-lucide-chevron-right', chevronUp: 'i-lucide-chevron-up', close: 'i-lucide-x', ellipsis: 'i-lucide-ellipsis', external: 'i-lucide-arrow-up-right', folder: 'i-lucide-folder', folderOpen: 'i-lucide-folder-open', loading: 'i-lucide-loader-circle', minus: 'i-lucide-minus', plus: 'i-lucide-plus', search: 'i-lucide-search' } } }) ] })`
Expand code
[Theme\
\
Learn how to customize Nuxt UI components using Tailwind CSS v4, CSS variables and the Tailwind Variants API for powerful and flexible theming.](https://ui.nuxt.com/getting-started/theme)
[Color Mode\
\
Nuxt UI integrates with VueUse to allow for easy switching between light and dark themes.](https://ui.nuxt.com/getting-started/color-mode/vue)
---
# Internationalization (i18n) - Nuxt UI
Internationalization (i18n)
===========================
Learn how to internationalize your Nuxt app with multi-directional support (LTR/RTL).
[](https://ui.nuxt.com/getting-started/i18n/vue)
Looking for the **Vue** version?
[Usage](https://ui.nuxt.com/getting-started/i18n/nuxt#usage)
-------------------------------------------------------------
[](https://ui.nuxt.com/components/app)
Nuxt UI provides an **App** component that wraps your app to provide global configurations.
### [Locale](https://ui.nuxt.com/getting-started/i18n/nuxt#locale)
Use the `locale` prop with the locale you want to use from `@nuxt/ui/locale`:
app.vue
` `
Use the `locale` prop with the locale you want to use from `@nuxt/ui-pro/locale`:
app.vue
` `
### [Custom locale](https://ui.nuxt.com/getting-started/i18n/nuxt#custom-locale)
You can create your own locale using the `defineLocale` composable:
app.vue
` `
app.vue
` `
Look at the `code` parameter, there you need to pass the iso code of the language. Example:
* `hi` Hindi (language)
* `de-AT`: German (language) as used in Austria (region)
### [Extend locale Soon](https://ui.nuxt.com/getting-started/i18n/nuxt#extend-locale)
You can customize an existing locale by overriding its `messages` or `code` using the `extendLocale` composable:
app.vue
` `
app.vue
` `
### [Dynamic locale](https://ui.nuxt.com/getting-started/i18n/nuxt#dynamic-locale)
To dynamically switch between languages, you can use the [Nuxt I18n](https://i18n.nuxtjs.org/)
module.
#### [Install the Nuxt I18n package](https://ui.nuxt.com/getting-started/i18n/nuxt#install-the-nuxt-i18n-package)
pnpmyarnnpmbun
`pnpm add @nuxtjs/i18n`
`yarn add @nuxtjs/i18n`
`npm install @nuxtjs/i18n`
`bun add @nuxtjs/i18n`
#### [Add the Nuxt I18n module in your `nuxt.config.ts`](https://ui.nuxt.com/getting-started/i18n/nuxt#add-the-nuxt-i18n-module-in-your-nuxtconfigts)
nuxt.config.ts
`export default defineNuxtConfig({ modules: [ '@nuxt/ui', '@nuxtjs/i18n' ], css: ['~/assets/css/main.css'], i18n: { locales: [{ code: 'de', name: 'Deutsch' }, { code: 'en', name: 'English' }, { code: 'fr', name: 'Français' }] } })`
#### [Set the `locale` prop using `useI18n`](https://ui.nuxt.com/getting-started/i18n/nuxt#set-the-locale-prop-using-usei18n)
app.vue
` `
app.vue
` `
### [Dynamic direction](https://ui.nuxt.com/getting-started/i18n/nuxt#dynamic-direction)
Each locale has a `dir` property which will be used by the `App` component to set the directionality of all components.
In a multilingual application, you might want to set the `lang` and `dir` attributes on the `` element dynamically based on the user's locale, which you can do with the [useHead](https://nuxt.com/docs/api/composables/use-head)
composable:
app.vue
` `
app.vue
` `
[Supported languages](https://ui.nuxt.com/getting-started/i18n/nuxt#supported-languages)
-----------------------------------------------------------------------------------------
By default, the `en` locale is used.
🇸🇦
العربية
Code: `ar`
🇦🇿
Azərbaycanca
Code: `az`
🇧🇬
Български
Code: `bg`
🇧🇩
বাংলা
Code: `bn`
🇪🇸
Català
Code: `ca`
🇮🇶
کوردی
Code: `ckb`
🇨🇿
Čeština
Code: `cs`
🇩🇰
Danish
Code: `da`
🇩🇪
Deutsch
Code: `de`
🇬🇷
Ελληνικά
Code: `el`
🇬🇧
English
Code: `en`
🇪🇸
Español
Code: `es`
🇪🇪
Eesti
Code: `et`
🇮🇷
فارسی
Code: `fa-IR`
🇫🇮
Suomeksi
Code: `fi`
🇫🇷
Français
Code: `fr`
🇮🇱
Hebrew
Code: `he`
🇮🇳
Hindi
Code: `hi`
🇭🇺
Magyar
Code: `hu`
🇦🇲
Հայերեն
Code: `hy`
🇮🇩
Indonesia
Code: `id`
🇮🇹
Italiano
Code: `it`
🇯🇵
日本語
Code: `ja`
🇰🇿
Қазақша
Code: `kk`
🇰🇭
ភាសាខ្មែរ
Code: `km`
🇰🇷
한국어
Code: `ko`
🇰🇬
Кыргызча
Code: `ky`
🇱🇺
Lëtzebuergesch
Code: `lb`
🇱🇹
Lietuvių
Code: `lt`
🇲🇳
Монгол
Code: `mn`
🇲🇾
Melayu
Code: `ms`
🇳🇴
Norsk Bokmål
Code: `nb-NO`
🇳🇱
Nederlands
Code: `nl`
🇵🇱
Polski
Code: `pl`
🇵🇹
Português
Code: `pt`
🇧🇷
Português (Brasil)
Code: `pt-BR`
🇷🇴
Română
Code: `ro`
🇷🇺
Русский
Code: `ru`
🇸🇰
Slovenčina
Code: `sk`
🇸🇮
Slovenščina
Code: `sl`
🇸🇪
Svenska
Code: `sv`
🇹🇭
ไทย
Code: `th`
🇹🇯
Тоҷикӣ
Code: `tj`
🇹🇷
Türkçe
Code: `tr`
🇨🇳
ئۇيغۇرچە
Code: `ug-CN`
🇺🇦
Українська
Code: `uk`
🇵🇰
Urdu
Code: `ur`
🇺🇿
Oʻzbek
Code: `uz`
🇻🇳
Tiếng Việt
Code: `vi`
🇨🇳
简体中文
Code: `zh-CN`
🇹🇼
繁體中文
Code: `zh-TW`
[](https://github.com/nuxt/ui/tree/v3/src/runtime/locale)
If you need additional languages, you can contribute by creating a PR to add a new locale in `src/runtime/locale/`.
You can use the `nuxt-ui` CLI to create a new locale:
nuxt-ui make locale --code "en" --name "English"
[Color Mode\
\
Nuxt UI integrates with Nuxt Color Mode to allow for easy switching between light and dark themes.](https://ui.nuxt.com/getting-started/color-mode/nuxt)
[defineShortcuts\
\
A composable to define keyboard shortcuts in your app.](https://ui.nuxt.com/composables/define-shortcuts)
---
# Vue ChatPromptSubmit Component - Nuxt UI Pro
ChatPromptSubmitPRO
===================
[Button](https://ui.nuxt.com/components/button)
[GitHub](https://github.com/nuxt/ui-pro/tree/v3/src/runtime/components/ChatPromptSubmit.vue)
A Button for submitting chat prompts with automatic status handling.
[Usage](https://ui.nuxt.com/components/chat-prompt-submit#usage)
-----------------------------------------------------------------
The ChatPromptSubmit component is used inside the [ChatPrompt](https://ui.nuxt.com/components/chat-prompt)
component to submit the prompt. It automatically handles the different `status` values to control the chat.
It extends the [Button](https://ui.nuxt.com/components/button)
component, so you can pass any property such as `color`, `variant`, `size`, etc.
` `
You can also use it inside the `footer` slot of the [`ChatPrompt`](https://ui.nuxt.com/components/chat-prompt)
component.
### [Ready](https://ui.nuxt.com/components/chat-prompt-submit#ready)
When its status is `ready`, use the `color`, `variant` and `icon` props to customize the Button. Defaults to:
* `color="primary"`
* `variant="solid"`
* `icon="i-lucide-arrow-up"`
color
primary
variant
solid
icon
` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.arrowUp` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.arrowUp` key.
### [Submitted](https://ui.nuxt.com/components/chat-prompt-submit#submitted)
When its status is `submitted`, use the `submitted-color`, `submitted-variant` and `submitted-icon` props to customize the Button. Defaults to:
* `submittedColor="neutral"`
* `submittedVariant="subtle"`
* `submittedIcon="i-lucide-square"`
The `stop` event is emitted when the user clicks on the Button.
submittedColor
neutral
submittedVariant
subtle
submittedIcon
` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.stop` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.stop` key.
### [Streaming](https://ui.nuxt.com/components/chat-prompt-submit#streaming)
When its status is `streaming`, use the `streaming-color`, `streaming-variant` and `streaming-icon` props to customize the Button. Defaults to:
* `streamingColor="neutral"`
* `streamingVariant="subtle"`
* `streamingIcon="i-lucide-square"`
The `stop` event is emitted when the user clicks on the Button.
streamingColor
neutral
streamingVariant
subtle
streamingIcon
` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.stop` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.stop` key.
### [Error](https://ui.nuxt.com/components/chat-prompt-submit#error)
When its status is `error`, use the `error-color`, `error-variant` and `error-icon` props to customize the Button. Defaults to:
* `errorColor="error"`
* `errorVariant="soft"`
* `errorIcon="i-lucide-rotate-ccw"`
The `reload` event is emitted when the user clicks on the Button.
errorColor
error
errorVariant
soft
errorIcon
` `
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.reload` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.reload` key.
[Examples](https://ui.nuxt.com/components/chat-prompt-submit#examples)
-----------------------------------------------------------------------
[](https://sdk.vercel.ai/docs/getting-started/nuxt)
These chat components are designed to be used with the `useChat` composable from **Vercel AI SDK**.
[](https://github.com/nuxt-ui-pro/chat)
Check out the source code of our **AI Chat template** on GitHub for a real-life example.
### [Within a page](https://ui.nuxt.com/components/chat-prompt-submit#within-a-page)
Use the ChatPromptSubmit component with the `useChat` composable to display a chat prompt within a page.
Pass the `status` prop and listen to the `stop` and `reload` events to control the chat.
pages/\[id\].vue
` `
[API](https://ui.nuxt.com/components/chat-prompt-submit#api)
-------------------------------------------------------------
### [Props](https://ui.nuxt.com/components/chat-prompt-submit#props)
| Prop | Default | Type |
| --- | --- | --- |
| `status` | `'ready'` | `"error" \| "submitted" \| "streaming" \| "ready"` |
| `icon` | `appConfig.ui.icons.arrowUp` | `string`
The icon displayed in the button when the status is `ready`. |
| `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`
The color of the button when the status is `ready`. |
| `variant` | `'solid'` | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`
The variant of the button when the status is `ready`. |
| `streamingIcon` | `appConfig.ui.icons.stop` | `string`
The icon displayed in the button when the status is `streaming`. |
| `streamingColor` | `'neutral'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`
The color of the button when the status is `streaming`. |
| `streamingVariant` | `'subtle'` | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`
The variant of the button when the status is `streaming`. |
| `submittedIcon` | `appConfig.ui.icons.stop` | `string`
The icon displayed in the button when the status is `submitted`. |
| `submittedColor` | `'neutral'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`
The color of the button when the status is `submitted`. |
| `submittedVariant` | `'subtle'` | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`
The variant of the button when the status is `submitted`. |
| `errorIcon` | `appConfig.ui.icons.reload` | `string`
The icon displayed in the button when the status is `error`. |
| `errorColor` | `'error'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`
The color of the button when the status is `error`. |
| `errorVariant` | `'soft'` | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`
The variant of the button when the status is `error`. |
| `label` | | `string` |
| `size` | `'md'` | `"md" \| "xs" \| "sm" \| "lg" \| "xl"` |
| `ui` | | `{ base?: ClassNameValue; } & { base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }`
Show properties
* `base?: ClassNameValue`
* `label?: ClassNameValue`
* `leadingIcon?: ClassNameValue`
* `leadingAvatar?: ClassNameValue`
* `leadingAvatarSize?: ClassNameValue`
* `trailingIcon?: ClassNameValue` |
### [Slots](https://ui.nuxt.com/components/chat-prompt-submit#slots)
| Slot | Type |
| --- | --- |
| `leading` | `{}` |
| `default` | `{}` |
| `trailing` | `{}` |
### [Emits](https://ui.nuxt.com/components/chat-prompt-submit#emits)
| Event | Type |
| --- | --- |
| `stop` | `[]` |
| `reload` | `[]` |
[Theme](https://ui.nuxt.com/components/chat-prompt-submit#theme)
-----------------------------------------------------------------
app.config.ts
`export default defineAppConfig({ uiPro: { chatPromptSubmit: { slots: { base: '' } } } })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import ui from '@nuxt/ui/vite' export default defineConfig({ plugins: [ vue(), ui({ uiPro: { chatPromptSubmit: { slots: { base: '' } } } }) ] })`
Expand code
vite.config.ts
`import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' import uiPro from '@nuxt/ui-pro/vite' export default defineConfig({ plugins: [ vue(), uiPro({ uiPro: { chatPromptSubmit: { slots: { base: '' } } } }) ] })`
Expand code
[ChatPrompt\
\
An enhanced Textarea for submitting prompts in AI chat interfaces.](https://ui.nuxt.com/components/chat-prompt)
[Checkbox\
\
An input element to toggle between checked and unchecked states.](https://ui.nuxt.com/components/checkbox)
---
# Fonts - Nuxt UI
Fonts
=====
[nuxt/fonts](https://github.com/nuxt/fonts)
Nuxt UI integrates with Nuxt Fonts to provide plug-and-play font optimization.
[Usage](https://ui.nuxt.com/getting-started/fonts#usage)
---------------------------------------------------------
Nuxt UI automatically registers the [`@nuxt/fonts`](https://github.com/nuxt/fonts)
module for you, so there's no additional setup required. To use a font in your Nuxt UI application, you can simply declare it in your CSS. It will be automatically loaded and optimized for you.
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui"; @theme { --font-sans: 'Public Sans', sans-serif; }`
app/assets/css/main.css
`@import "tailwindcss"; @import "@nuxt/ui-pro"; @theme { --font-sans: 'Public Sans', sans-serif; }`
You can disable the `@nuxt/fonts` module with the `ui.fonts` option in your `nuxt.config.ts`:
nuxt.config.ts
`export default defineNuxtConfig({ ui: { fonts: false } })`
[Icons\
\
Nuxt UI integrates with Nuxt Icon to access over 200,000+ icons from Iconify.](https://ui.nuxt.com/getting-started/icons/nuxt)
[Color Mode\
\
Nuxt UI integrates with Nuxt Color Mode to allow for easy switching between light and dark themes.](https://ui.nuxt.com/getting-started/color-mode/nuxt)
---
# Vue CommandPalette Component - Nuxt UI
CommandPalette
==============
[Fuse.js](https://fusejs.io/)
[Listbox](https://reka-ui.com/docs/components/listbox)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/CommandPalette.vue)
A command palette with full-text search powered by Fuse.js for efficient fuzzy matching.
[Usage](https://ui.nuxt.com/components/command-palette#usage)
--------------------------------------------------------------
Use the `v-model` directive to control the value of the CommandPalette or the `default-value` prop to set the initial value when you do not need to control its state.
[](https://ui.nuxt.com/components/command-palette#control-selected-items)
You can also use the `@update:model-value` event to listen to the selected item(s).
### [Groups](https://ui.nuxt.com/components/command-palette#groups)
The CommandPalette component filters groups and ranks matching commands by relevance as users type. It provides dynamic, instant search results for efficient command discovery. Use the `groups` prop as an array of objects with the following properties:
* `id: string`
* `label?: string`
* `slot?: string`
* `items?: CommandPaletteItem[]`
* [`ignoreFilter?: boolean`](https://ui.nuxt.com/components/command-palette#with-ignore-filter)
* [`postFilter?: (searchTerm: string, items: T[]) => T[]`](https://ui.nuxt.com/components/command-palette#with-post-filtered-items)
* `highlightedIcon?: string`
You must provide an `id` for each group otherwise the group will be ignored.
Each group contains an `items` array of objects that define the commands. Each item can have the following properties:
* `prefix?: string`
* `label?: string`
* `suffix?: string`
* `icon?: string`
* `avatar?: AvatarProps`
* `chip?: ChipProps`
* `kbds?: string[] | KbdProps[]`
* `active?: boolean`
* `loading?: boolean`
* `disabled?: boolean`
* [`slot?: string`](https://ui.nuxt.com/components/command-palette#with-custom-slot)
* `onSelect?(e?: Event): void`
* `class?: any`
* `ui?: { item?: ClassNameValue, itemLeadingIcon?: ClassNameValue, itemLeadingAvatarSize?: ClassNameValue, itemLeadingAvatar?: ClassNameValue, itemLeadingChipSize?: ClassNameValue, itemLeadingChip?: ClassNameValue, itemLabel?: ClassNameValue, itemLabelPrefix?: ClassNameValue, itemLabelBase?: ClassNameValue, itemLabelSuffix?: ClassNameValue, itemTrailing?: ClassNameValue, itemTrailingKbds?: ClassNameValue, itemTrailingKbdsSize?: ClassNameValue, itemTrailingHighlightedIcon?: ClassNameValue, itemTrailingIcon?: ClassNameValue,}`
You can pass any property from the [Link](https://ui.nuxt.com/components/link#props)
component such as `to`, `target`, etc.
Users
Benjamin CanacbenjamincanacSylvain MarroufinsmarroufinSébastien ChopinatinuxRomain HamelromhmlHaytham A. SalamaHaythamasalamaDaniel RoedanielroeNeil Richternoook
` `
Expand code
### [Multiple](https://ui.nuxt.com/components/command-palette#multiple)
Use the `multiple` prop to allow multiple selections.
Users
Benjamin CanacbenjamincanacSylvain MarroufinsmarroufinSébastien ChopinatinuxRomain HamelromhmlHaytham A. SalamaHaythamasalamaDaniel RoedanielroeNeil Richternoook
` `
Expand code
Ensure to pass an array to the `default-value` prop or the `v-model` directive.
### [Placeholder](https://ui.nuxt.com/components/command-palette#placeholder)
Use the `placeholder` prop to change the placeholder text.
placeholder
CalendarMusicMaps
` `
Expand code
### [Icon](https://ui.nuxt.com/components/command-palette#icon)
Use the `icon` prop to customize the input [Icon](https://ui.nuxt.com/components/icon)
. Defaults to `i-lucide-search`.
icon
CalendarMusicMaps
` `
Expand code
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.search` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.search` key.
### [Loading](https://ui.nuxt.com/components/command-palette#loading)
Use the `loading` prop to show a loading icon on the CommandPalette.
loading
true
CalendarMusicMaps
` `
Expand code
### [Loading Icon](https://ui.nuxt.com/components/command-palette#loading-icon)
Use the `loading-icon` prop to customize the loading icon. Defaults to `i-lucide-loader-circle`.
loading
true
loadingIcon
CalendarMusicMaps
` `
Expand code
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.loading` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.loading` key.
### [Disabled](https://ui.nuxt.com/components/command-palette#disabled)
Use the `disabled` prop to disable the CommandPalette.
disabled
true
CalendarMusicMaps
` `
Expand code
### [Close](https://ui.nuxt.com/components/command-palette#close)
Use the `close` prop to display a [Button](https://ui.nuxt.com/components/button)
to dismiss the CommandPalette.
An `update:open` event will be emitted when the close button is clicked.
CalendarMusicMaps
` `
Expand code
You can pass any property from the [Button](https://ui.nuxt.com/components/button)
component to customize it.
close.class
CalendarMusicMaps
` `
Expand code
### [Close Icon](https://ui.nuxt.com/components/command-palette#close-icon)
Use the `close-icon` prop to customize the close button [Icon](https://ui.nuxt.com/components/icon)
. Defaults to `i-lucide-x`.
closeIcon
CalendarMusicMaps
` `
Expand code
[](https://ui.nuxt.com/getting-started/icons/nuxt#theme)
You can customize this icon globally in your `app.config.ts` under `ui.icons.close` key.
[](https://ui.nuxt.com/getting-started/icons/vue#theme)
You can customize this icon globally in your `vite.config.ts` under `ui.icons.close` key.
[Examples](https://ui.nuxt.com/components/command-palette#examples)
--------------------------------------------------------------------
### [Control selected item(s)](https://ui.nuxt.com/components/command-palette#control-selected-items)
You can control the selected item(s) by using the `default-value` prop or the `v-model` directive, by using the `onSelect` field on each item or by using the `@update:model-value` event.
Users
[Benjamin Canacbenjamincanac](https://github.com/benjamincanac)
[Sylvain Marroufinsmarroufin](https://github.com/smarroufin)
[Sébastien Chopinatinux](https://github.com/atinux)
[Romain Hamelromhml](https://github.com/romhml)
[Haytham A. SalamaHaythamasalama](https://github.com/Haythamasalama)
[Daniel Roedanielroe](https://github.com/danielroe)
[Neil Richternoook](https://github.com/noook)
Add new fileCreate a new file in the current directory or workspace. NAdd new folderCreate a new folder in the current directory or workspace. FAdd hashtagAdd a hashtag to the current item. HAdd labelAdd a label to the current item. L
` `
Expand code
### [Control search term](https://ui.nuxt.com/components/command-palette#control-search-term)
Use the `v-model:search-term` directive to control the search term.
[Benjamin Canacbenjamincanac](https://github.com/benjamincanac)
[Sébastien Chopinatinux](https://github.com/atinux)
` `
Expand code
This example uses the `@update:model-value` event to reset the search term when an item is selected.
### [With fetched items](https://ui.nuxt.com/components/command-palette#with-fetched-items)
You can fetch items from an API and use them in the CommandPalette.
Users
Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementina DuBuque[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
`` ``
Expand code
### [With ignore filter](https://ui.nuxt.com/components/command-palette#with-ignore-filter)
You can set the `ignoreFilter` field to `true` on a group to disable the internal search and use your own search logic.
Users
Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementina DuBuque[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
`` ``
Expand code
This example uses [`refDebounced`](https://vueuse.org/shared/refDebounced/#refdebounced)
to debounce the API calls.
### [With post-filtered items](https://ui.nuxt.com/components/command-palette#with-post-filtered-items)
You can use the `postFilter` field on a group to filter items after the search happened.
IntroductionInstallation
` `
Expand code
Start typing to see items with higher level appear.
### [With custom fuse search](https://ui.nuxt.com/components/command-palette#with-custom-fuse-search)
You can use the `fuse` prop to override the options of [useFuse](https://vueuse.org/integrations/useFuse)
which defaults to:
`{ fuseOptions: { ignoreLocation: true, threshold: 0.1, keys: ['label', 'suffix'] }, resultLimit: 12, matchAllWhenSearchEmpty: true }`
The `fuseOptions` are the options of [Fuse.js](https://www.fusejs.io/api/options.html)
, the `resultLimit` is the maximum number of results to return and the `matchAllWhenSearchEmpty` is a boolean to match all items when the search term is empty.
You can for example set `{ fuseOptions: { includeMatches: true } }` to highlight the search term in the items.
Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
Clementina DuBuque[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection)
`` ``
Expand code
### [Within a Popover](https://ui.nuxt.com/components/command-palette#within-a-popover)
You can use the CommandPalette component inside a [Popover](https://ui.nuxt.com/components/popover)
's content.
Select labels
` `
Expand code
### [Within a Modal](https://ui.nuxt.com/components/command-palette#within-a-modal)
You can use the CommandPalette component inside a [Modal](https://ui.nuxt.com/components/modal)
's content.
Search users...
`` ``
Expand code
### [Within a Drawer](https://ui.nuxt.com/components/command-palette#within-a-drawer)
You can use the CommandPalette component inside a [Drawer](https://ui.nuxt.com/components/drawer)
's content.
Search users...
`` ``
Expand code
### [Listen open state](https://ui.nuxt.com/components/command-palette#listen-open-state)
When using the `close` prop, you can listen to the `update:open` event when the button is clicked.
Search users...
` `
Expand code
This can be useful when using the CommandPalette inside a [`Modal`](https://ui.nuxt.com/components/modal)
for example.
### [With custom slot](https://ui.nuxt.com/components/command-palette#with-custom-slot)
Use the `slot` property to customize a specific item or group.
You will have access to the following slots:
* `#{{ item.slot }}`
* `#{{ item.slot }}-leading`
* `#{{ item.slot }}-label`
* `#{{ item.slot }}-trailing`
* `#{{ group.slot }}`
* `#{{ group.slot }}-leading`
* `#{{ group.slot }}-label`
* `#{{ group.slot }}-trailing`
Profile PBilling 50% off BNotificationsSecurity
Users
[Benjamin Canacbenjamincanac](https://github.com/benjamincanac)
[Sylvain Marroufinsmarroufin](https://github.com/smarroufin)
[Sébastien Chopinatinux](https://github.com/atinux)
[Romain Hamelromhml](https://github.com/romhml)
[Haytham A. SalamaHaythamasalama](https://github.com/Haythamasalama)
[Daniel Roedanielroe](https://github.com/danielroe)
[Neil Richternoook](https://github.com/noook)
`` {{ item.label }} 50% off ``
[](https://ui.nuxt.com/components/command-palette#slots)
You can also use the `#item`, `#item-leading`, `#item-label` and `#item-trailing` slots to customize all items.
[API](https://ui.nuxt.com/components/command-palette#api)
----------------------------------------------------------
### [Props](https://ui.nuxt.com/components/command-palette#props)
| Prop | Default | Type |
| --- | --- | --- |
| `as` | `'div'` | `any`
The element or component this component should render as. |
| `icon` | `appConfig.ui.icons.search` | `string`
The icon displayed in the input. |
| `selectedIcon` | `appConfig.ui.icons.check` | `string`
The icon displayed when an item is selected. |
| `placeholder` | `t('commandPalette.placeholder')` | `string`
The placeholder text for the input. |
| `autofocus` | `true` | `boolean`
Automatically focus the input when component is mounted. |
| `close` | `false` | `boolean \| Partial`
Display a close button in the input (useful when inside a Modal for example). `{ size: 'md', color: 'neutral', variant: 'ghost' }` |
| `closeIcon` | `appConfig.ui.icons.close` | `string`
The icon displayed in the close button. |
| `groups` | | `CommandPaletteGroup[]` |
| `fuse` | `{ fuseOptions: { ignoreLocation: true, threshold: 0.1, keys: ['label', 'suffix'] }, resultLimit: 12, matchAllWhenSearchEmpty: true }` | `UseFuseOptions`
The key used to get the label from the item. |
| `multiple` | | `boolean`
Whether multiple options can be selected or not. |
| `disabled` | | `boolean`
When `true`, prevents the user from interacting with listbox |
| `modelValue` | `''` | `null \| string \| number \| bigint \| Record \| AcceptableValue[]`
The controlled value of the listbox. Can be binded with with `v-model`. |
| `defaultValue` | | `null \| string \| number \| bigint \| Record \| AcceptableValue[]`
The value of the listbox when initially rendered. Use when you do not need to control the state of the Listbox |
| `highlightOnHover` | | `boolean`
When `true`, hover over item will trigger highlight |
| `loading` | | `boolean`
When `true`, the loading icon will be displayed. |
| `loadingIcon` | `appConfig.ui.icons.loading` | `string`
The position of the chip. Defaults to `'top-right'`.
* `inset?: boolean`
When `true`, keep the chip inside the component for rounded elements.
* `standalone?: boolean`
When `true`, render the chip relatively to the parent.
* `class?: any`
* `ui?: { root?: ClassNameValue; base?: ClassNameValue; }` |
| `text` | | `string` |
| `ui` | | `{ root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }` |
[Collapsible\
\
A collapsible element to toggle visibility of its content.](https://ui.nuxt.com/components/collapsible)
[ColorModeButton\
\
A Button to switch between light and dark mode.](https://ui.nuxt.com/components/color-mode-button)
---
# Color Mode - Nuxt UI
Color Mode
==========
[nuxtjs/color-mode](https://github.com/nuxt-modules/color-mode)
Nuxt UI integrates with Nuxt Color Mode to allow for easy switching between light and dark themes.
[](https://ui.nuxt.com/getting-started/color-mode/vue)
Looking for the **Vue** version?
[Usage](https://ui.nuxt.com/getting-started/color-mode/nuxt#usage)
-------------------------------------------------------------------
Nuxt UI automatically registers the [`@nuxtjs/color-mode`](https://github.com/nuxt-modules/color-mode)
module for you, so there's no additional setup required. You can simply use the `useColorMode` composable to switch between light and dark modes:
ColorModeButton.vue
` `
You can disable the `@nuxtjs/color-mode` module with the `ui.colorMode` option in your `nuxt.config.ts`:
nuxt.config.ts
`export default defineNuxtConfig({ modules: ['@nuxt/ui'], css: ['~/assets/css/main.css'], ui: { colorMode: false } })`
[Fonts\
\
Nuxt UI integrates with Nuxt Fonts to provide plug-and-play font optimization.](https://ui.nuxt.com/getting-started/fonts)
[Internationalization (i18n)\
\
Learn how to internationalize your Nuxt app with multi-directional support (LTR/RTL).](https://ui.nuxt.com/getting-started/i18n/nuxt)
---
# Vue ContextMenu Component - Nuxt UI
ContextMenu
===========
[ContextMenu](https://reka-ui.com/docs/components/context-menu)
[GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/ContextMenu.vue)
A menu to display actions when right-clicking on an element.
[Usage](https://ui.nuxt.com/components/context-menu#usage)
-----------------------------------------------------------
Use anything you like in the default slot of the ContextMenu, and right-click on it to display the menu.
### [Items](https://ui.nuxt.com/components/context-menu#items)
Use the `items` prop as an array of objects with the following properties:
* `label?: string`
* `icon?: string`
* `color?: string`
* `avatar?: AvatarProps`
* `kbds?: string[] | KbdProps[]`
* [`type?: "link" | "label" | "separator" | "checkbox"`](https://ui.nuxt.com/components/context-menu#with-checkbox-items)
* [`color?: "error" | "primary" | "secondary" | "success" | "info" | "warning" | "neutral"`](https://ui.nuxt.com/components/context-menu#with-color-items)
* [`checked?: boolean`](https://ui.nuxt.com/components/context-menu#with-checkbox-items)
* `disabled?: boolean`
* [`slot?: string`](https://ui.nuxt.com/components/context-menu#with-custom-slot)
* `onSelect?(e: Event): void`
* [`onUpdateChecked?(checked: boolean): void`](https://ui.nuxt.com/components/context-menu#with-checkbox-items)
* `children?: ContextMenuItem[] | ContextMenuItem[][]`
* `class?: any`
* `ui?: { item?: ClassNameValue, label?: ClassNameValue, separator?: ClassNameValue, itemLeadingIcon?: ClassNameValue, itemLeadingAvatarSize?: ClassNameValue, itemLeadingAvatar?: ClassNameValue, itemLabel?: ClassNameValue, itemLabelExternalIcon?: ClassNameValue, itemTrailing?: ClassNameValue, itemTrailingIcon?: ClassNameValue, itemTrailingKbds?: ClassNameValue, itemTrailingKbdsSize?: ClassNameValue }`
You can pass any property from the [Link](https://ui.nuxt.com/components/link#props)
component such as `to`, `target`, etc.
Right click here
`
Right click here
`
Expand code
You can also pass an array of arrays to the `items` prop to create separated groups of items.
Each item can take a `children` array of objects with the same properties as the `items` prop to create a nested menu which can be controlled using the `open`, `defaultOpen` and `content` properties.
### [Size](https://ui.nuxt.com/components/context-menu#size)
Use the `size` prop to change the size of the ContextMenu.
size
xl
Right click here
`
Right click here
`
### [Disabled](https://ui.nuxt.com/components/context-menu#disabled)
Use the `disabled` prop to disable the ContextMenu.
disabled
true
Right click here
`
Right click here
`
[Examples](https://ui.nuxt.com/components/context-menu#examples)
-----------------------------------------------------------------
### [With checkbox items](https://ui.nuxt.com/components/context-menu#with-checkbox-items)
You can use the `type` property with `checkbox` and use the `checked` / `onUpdateChecked` properties to control the checked state of the item.
Right click here
`
Right click here
`
Expand code
To ensure reactivity for the `checked` state of items, it's recommended to wrap your `items` array inside a `computed`.
### [With color items](https://ui.nuxt.com/components/context-menu#with-color-items)
You can use the `color` property to highlight certain items with a color.
Right click here
`
Right click here
`
### [With custom slot](https://ui.nuxt.com/components/context-menu#with-custom-slot)
Use the `slot` property to customize a specific item.
You will have access to the following slots:
* `#{{ item.slot }}`
* `#{{ item.slot }}-leading`
* `#{{ item.slot }}-label`
* `#{{ item.slot }}-trailing`
Right click here
`
Right click here
{{ loading ? 'Refreshing...' : 'Refresh the Page' }} `
[](https://ui.nuxt.com/components/context-menu#slots)
You can also use the `#item`, `#item-leading`, `#item-label` and `#item-trailing` slots to customize all items.
### [Extract shortcuts](https://ui.nuxt.com/components/context-menu#extract-shortcuts)
When you have some items with `kbds` property (displaying some [Kbd](https://ui.nuxt.com/components/kbd)
), you can easily make them work with the [defineShortcuts](https://ui.nuxt.com/composables/define-shortcuts)
composable.
Inside the `defineShortcuts` composable, there is an `extractShortcuts` utility that will extract the shortcuts recursively from the items and return an object that you can pass to `defineShortcuts`. It will automatically call the `select` function of the item when the shortcut is pressed.
``
In this example, S, ⇧ D, ⌥ U, ⌥ I, ⌥ C and ⌥ J would trigger the `select` function of the corresponding item.
[API](https://ui.nuxt.com/components/context-menu#api)
-------------------------------------------------------
### [Props](https://ui.nuxt.com/components/context-menu#props)
| Prop | Default | Type |
| --- | --- | --- |
| `size` | `'md'` | `"sm" \| "md" \| "xs" \| "lg" \| "xl"` |
| `items` | | `ContextMenuItem[] \| ContextMenuItem[][]`
Where to display the linked URL, as the name for a browsing context. |
| `checkedIcon` | `appConfig.ui.icons.check` | `string`
The icon displayed when an item is checked. |
| `loadingIcon` | `appConfig.ui.icons.loading` | `string`
The icon displayed when an item is loading. |
| `externalIcon` | `true` | `string \| false \| true`
The icon displayed when the item is an external link. Set to `false` to hide the external icon. |
| `content` | | `ContextMenuContentProps & Partial>`
The content of the menu.
Show properties
* `alignOffset?: number`
An offset in pixels from the `start` or `end` alignment options. Defaults to `0`.
* `avoidCollisions?: boolean`
When `true`, overrides the side and align preferences to prevent collisions with boundary edges. Defaults to `true`.
* `collisionBoundary?: Element \| (Element \| null)[] \| null`
The element used as the collision boundary. By default this is the viewport, though you can provide additional element(s) to be included in this check. Defaults to `[]`.
* `collisionPadding?: number \| Partial>`
The distance in pixels from the boundary edges where collision detection should occur. Accepts a number (same for all sides), or a partial padding object, for example: { top: 20, left: 20 }. Defaults to `0`.
* `sticky?: "partial" \| "always"`
The sticky behavior on the align axis. `partial` will keep the content in the boundary as long as the trigger is at least partially in the boundary whilst "always" will keep the content in the boundary regardless. Defaults to `"partial"`.
* `hideWhenDetached?: boolean`
Whether to hide the content when the trigger becomes fully occluded. Defaults to `false`.
* `positionStrategy?: "fixed" \| "absolute"`
The type of CSS position property to use.
* `disableUpdateOnLayoutShift?: boolean`
Whether to disable the update position for the content when the layout shifted. Defaults to `false`.
* `prioritizePosition?: boolean`
Force content to be position within the viewport.
Might overlap the reference element, which may not be desired. Defaults to `false`.
* `reference?: ReferenceElement`
The custom element or virtual element that will be set as the reference to position the floating element.
If provided, it will replace the default anchor element.
* `loop?: boolean`
When `true`, keyboard navigation will loop from last item to first, and vice versa. Defaults to `false`.