# 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 preview](https://ui.nuxt.com/components/light/app.png)![App preview](https://ui.nuxt.com/components/dark/app.png)App](https://ui.nuxt.com/components/app) [![Accordion preview](https://ui.nuxt.com/components/light/accordion.png)![Accordion preview](https://ui.nuxt.com/components/dark/accordion.png)Accordion](https://ui.nuxt.com/components/accordion) [![Alert preview](https://ui.nuxt.com/components/light/alert.png)![Alert preview](https://ui.nuxt.com/components/dark/alert.png)Alert](https://ui.nuxt.com/components/alert) [![Avatar preview](https://ui.nuxt.com/components/light/avatar.png)![Avatar preview](https://ui.nuxt.com/components/dark/avatar.png)Avatar](https://ui.nuxt.com/components/avatar) [![AvatarGroup preview](https://ui.nuxt.com/components/light/avatar-group.png)![AvatarGroup preview](https://ui.nuxt.com/components/dark/avatar-group.png)AvatarGroup](https://ui.nuxt.com/components/avatar-group) [![Badge preview](https://ui.nuxt.com/components/light/badge.png)![Badge preview](https://ui.nuxt.com/components/dark/badge.png)Badge](https://ui.nuxt.com/components/badge) [![Breadcrumb preview](https://ui.nuxt.com/components/light/breadcrumb.png)![Breadcrumb preview](https://ui.nuxt.com/components/dark/breadcrumb.png)Breadcrumb](https://ui.nuxt.com/components/breadcrumb) [![Button preview](https://ui.nuxt.com/components/light/button.png)![Button preview](https://ui.nuxt.com/components/dark/button.png)Button](https://ui.nuxt.com/components/button) [![ButtonGroup preview](https://ui.nuxt.com/components/light/button-group.png)![ButtonGroup preview](https://ui.nuxt.com/components/dark/button-group.png)ButtonGroup](https://ui.nuxt.com/components/button-group) [![Calendar preview](https://ui.nuxt.com/components/light/calendar.png)![Calendar preview](https://ui.nuxt.com/components/dark/calendar.png)Calendar](https://ui.nuxt.com/components/calendar) [![App preview](https://ui.nuxt.com/components/light/app.png)![App preview](https://ui.nuxt.com/components/dark/app.png)App](https://ui.nuxt.com/components/app) [![Accordion preview](https://ui.nuxt.com/components/light/accordion.png)![Accordion preview](https://ui.nuxt.com/components/dark/accordion.png)Accordion](https://ui.nuxt.com/components/accordion) [![Alert preview](https://ui.nuxt.com/components/light/alert.png)![Alert preview](https://ui.nuxt.com/components/dark/alert.png)Alert](https://ui.nuxt.com/components/alert) [![Avatar preview](https://ui.nuxt.com/components/light/avatar.png)![Avatar preview](https://ui.nuxt.com/components/dark/avatar.png)Avatar](https://ui.nuxt.com/components/avatar) [![AvatarGroup preview](https://ui.nuxt.com/components/light/avatar-group.png)![AvatarGroup preview](https://ui.nuxt.com/components/dark/avatar-group.png)AvatarGroup](https://ui.nuxt.com/components/avatar-group) [![Badge preview](https://ui.nuxt.com/components/light/badge.png)![Badge preview](https://ui.nuxt.com/components/dark/badge.png)Badge](https://ui.nuxt.com/components/badge) [![Breadcrumb preview](https://ui.nuxt.com/components/light/breadcrumb.png)![Breadcrumb preview](https://ui.nuxt.com/components/dark/breadcrumb.png)Breadcrumb](https://ui.nuxt.com/components/breadcrumb) [![Button preview](https://ui.nuxt.com/components/light/button.png)![Button preview](https://ui.nuxt.com/components/dark/button.png)Button](https://ui.nuxt.com/components/button) [![ButtonGroup preview](https://ui.nuxt.com/components/light/button-group.png)![ButtonGroup preview](https://ui.nuxt.com/components/dark/button-group.png)ButtonGroup](https://ui.nuxt.com/components/button-group) [![Calendar preview](https://ui.nuxt.com/components/light/calendar.png)![Calendar preview](https://ui.nuxt.com/components/dark/calendar.png)Calendar](https://ui.nuxt.com/components/calendar) [![App preview](https://ui.nuxt.com/components/light/app.png)![App preview](https://ui.nuxt.com/components/dark/app.png)App](https://ui.nuxt.com/components/app) [![Accordion preview](https://ui.nuxt.com/components/light/accordion.png)![Accordion preview](https://ui.nuxt.com/components/dark/accordion.png)Accordion](https://ui.nuxt.com/components/accordion) [![Alert preview](https://ui.nuxt.com/components/light/alert.png)![Alert preview](https://ui.nuxt.com/components/dark/alert.png)Alert](https://ui.nuxt.com/components/alert) [![Avatar preview](https://ui.nuxt.com/components/light/avatar.png)![Avatar preview](https://ui.nuxt.com/components/dark/avatar.png)Avatar](https://ui.nuxt.com/components/avatar) [![AvatarGroup preview](https://ui.nuxt.com/components/light/avatar-group.png)![AvatarGroup preview](https://ui.nuxt.com/components/dark/avatar-group.png)AvatarGroup](https://ui.nuxt.com/components/avatar-group) [![Badge preview](https://ui.nuxt.com/components/light/badge.png)![Badge preview](https://ui.nuxt.com/components/dark/badge.png)Badge](https://ui.nuxt.com/components/badge) [![Breadcrumb preview](https://ui.nuxt.com/components/light/breadcrumb.png)![Breadcrumb preview](https://ui.nuxt.com/components/dark/breadcrumb.png)Breadcrumb](https://ui.nuxt.com/components/breadcrumb) [![Button preview](https://ui.nuxt.com/components/light/button.png)![Button preview](https://ui.nuxt.com/components/dark/button.png)Button](https://ui.nuxt.com/components/button) [![ButtonGroup preview](https://ui.nuxt.com/components/light/button-group.png)![ButtonGroup preview](https://ui.nuxt.com/components/dark/button-group.png)ButtonGroup](https://ui.nuxt.com/components/button-group) [![Calendar preview](https://ui.nuxt.com/components/light/calendar.png)![Calendar preview](https://ui.nuxt.com/components/dark/calendar.png)Calendar](https://ui.nuxt.com/components/calendar) [![App preview](https://ui.nuxt.com/components/light/app.png)![App preview](https://ui.nuxt.com/components/dark/app.png)App](https://ui.nuxt.com/components/app) [![Accordion preview](https://ui.nuxt.com/components/light/accordion.png)![Accordion preview](https://ui.nuxt.com/components/dark/accordion.png)Accordion](https://ui.nuxt.com/components/accordion) [![Alert preview](https://ui.nuxt.com/components/light/alert.png)![Alert preview](https://ui.nuxt.com/components/dark/alert.png)Alert](https://ui.nuxt.com/components/alert) [![Avatar preview](https://ui.nuxt.com/components/light/avatar.png)![Avatar preview](https://ui.nuxt.com/components/dark/avatar.png)Avatar](https://ui.nuxt.com/components/avatar) [![AvatarGroup preview](https://ui.nuxt.com/components/light/avatar-group.png)![AvatarGroup preview](https://ui.nuxt.com/components/dark/avatar-group.png)AvatarGroup](https://ui.nuxt.com/components/avatar-group) [![Badge preview](https://ui.nuxt.com/components/light/badge.png)![Badge preview](https://ui.nuxt.com/components/dark/badge.png)Badge](https://ui.nuxt.com/components/badge) [![Breadcrumb preview](https://ui.nuxt.com/components/light/breadcrumb.png)![Breadcrumb preview](https://ui.nuxt.com/components/dark/breadcrumb.png)Breadcrumb](https://ui.nuxt.com/components/breadcrumb) [![Button preview](https://ui.nuxt.com/components/light/button.png)![Button preview](https://ui.nuxt.com/components/dark/button.png)Button](https://ui.nuxt.com/components/button) [![ButtonGroup preview](https://ui.nuxt.com/components/light/button-group.png)![ButtonGroup preview](https://ui.nuxt.com/components/dark/button-group.png)ButtonGroup](https://ui.nuxt.com/components/button-group) [![Calendar preview](https://ui.nuxt.com/components/light/calendar.png)![Calendar preview](https://ui.nuxt.com/components/dark/calendar.png)Calendar](https://ui.nuxt.com/components/calendar) [![Card preview](https://ui.nuxt.com/components/light/card.png)![Card preview](https://ui.nuxt.com/components/dark/card.png)Card](https://ui.nuxt.com/components/card) [![Carousel preview](https://ui.nuxt.com/components/light/carousel.png)![Carousel preview](https://ui.nuxt.com/components/dark/carousel.png)Carousel](https://ui.nuxt.com/components/carousel) [![Checkbox preview](https://ui.nuxt.com/components/light/checkbox.png)![Checkbox preview](https://ui.nuxt.com/components/dark/checkbox.png)Checkbox](https://ui.nuxt.com/components/checkbox) [![CheckboxGroup preview](https://ui.nuxt.com/components/light/checkbox-group.png)![CheckboxGroup preview](https://ui.nuxt.com/components/dark/checkbox-group.png)CheckboxGroup](https://ui.nuxt.com/components/checkbox-group) [![Chip preview](https://ui.nuxt.com/components/light/chip.png)![Chip preview](https://ui.nuxt.com/components/dark/chip.png)Chip](https://ui.nuxt.com/components/chip) [![Collapsible preview](https://ui.nuxt.com/components/light/collapsible.png)![Collapsible preview](https://ui.nuxt.com/components/dark/collapsible.png)Collapsible](https://ui.nuxt.com/components/collapsible) [![ColorPicker preview](https://ui.nuxt.com/components/light/color-picker.png)![ColorPicker preview](https://ui.nuxt.com/components/dark/color-picker.png)ColorPicker](https://ui.nuxt.com/components/color-picker) [![CommandPalette preview](https://ui.nuxt.com/components/light/command-palette.png)![CommandPalette preview](https://ui.nuxt.com/components/dark/command-palette.png)CommandPalette](https://ui.nuxt.com/components/command-palette) [![Container preview](https://ui.nuxt.com/components/light/container.png)![Container preview](https://ui.nuxt.com/components/dark/container.png)Container](https://ui.nuxt.com/components/container) [![ContextMenu preview](https://ui.nuxt.com/components/light/context-menu.png)![ContextMenu preview](https://ui.nuxt.com/components/dark/context-menu.png)ContextMenu](https://ui.nuxt.com/components/context-menu) [![Card preview](https://ui.nuxt.com/components/light/card.png)![Card preview](https://ui.nuxt.com/components/dark/card.png)Card](https://ui.nuxt.com/components/card) [![Carousel preview](https://ui.nuxt.com/components/light/carousel.png)![Carousel preview](https://ui.nuxt.com/components/dark/carousel.png)Carousel](https://ui.nuxt.com/components/carousel) [![Checkbox preview](https://ui.nuxt.com/components/light/checkbox.png)![Checkbox preview](https://ui.nuxt.com/components/dark/checkbox.png)Checkbox](https://ui.nuxt.com/components/checkbox) [![CheckboxGroup preview](https://ui.nuxt.com/components/light/checkbox-group.png)![CheckboxGroup preview](https://ui.nuxt.com/components/dark/checkbox-group.png)CheckboxGroup](https://ui.nuxt.com/components/checkbox-group) [![Chip preview](https://ui.nuxt.com/components/light/chip.png)![Chip preview](https://ui.nuxt.com/components/dark/chip.png)Chip](https://ui.nuxt.com/components/chip) [![Collapsible preview](https://ui.nuxt.com/components/light/collapsible.png)![Collapsible preview](https://ui.nuxt.com/components/dark/collapsible.png)Collapsible](https://ui.nuxt.com/components/collapsible) [![ColorPicker preview](https://ui.nuxt.com/components/light/color-picker.png)![ColorPicker preview](https://ui.nuxt.com/components/dark/color-picker.png)ColorPicker](https://ui.nuxt.com/components/color-picker) [![CommandPalette preview](https://ui.nuxt.com/components/light/command-palette.png)![CommandPalette preview](https://ui.nuxt.com/components/dark/command-palette.png)CommandPalette](https://ui.nuxt.com/components/command-palette) [![Container preview](https://ui.nuxt.com/components/light/container.png)![Container preview](https://ui.nuxt.com/components/dark/container.png)Container](https://ui.nuxt.com/components/container) [![ContextMenu preview](https://ui.nuxt.com/components/light/context-menu.png)![ContextMenu preview](https://ui.nuxt.com/components/dark/context-menu.png)ContextMenu](https://ui.nuxt.com/components/context-menu) [![Card preview](https://ui.nuxt.com/components/light/card.png)![Card preview](https://ui.nuxt.com/components/dark/card.png)Card](https://ui.nuxt.com/components/card) [![Carousel preview](https://ui.nuxt.com/components/light/carousel.png)![Carousel preview](https://ui.nuxt.com/components/dark/carousel.png)Carousel](https://ui.nuxt.com/components/carousel) [![Checkbox preview](https://ui.nuxt.com/components/light/checkbox.png)![Checkbox preview](https://ui.nuxt.com/components/dark/checkbox.png)Checkbox](https://ui.nuxt.com/components/checkbox) [![CheckboxGroup preview](https://ui.nuxt.com/components/light/checkbox-group.png)![CheckboxGroup preview](https://ui.nuxt.com/components/dark/checkbox-group.png)CheckboxGroup](https://ui.nuxt.com/components/checkbox-group) [![Chip preview](https://ui.nuxt.com/components/light/chip.png)![Chip preview](https://ui.nuxt.com/components/dark/chip.png)Chip](https://ui.nuxt.com/components/chip) [![Collapsible preview](https://ui.nuxt.com/components/light/collapsible.png)![Collapsible preview](https://ui.nuxt.com/components/dark/collapsible.png)Collapsible](https://ui.nuxt.com/components/collapsible) [![ColorPicker preview](https://ui.nuxt.com/components/light/color-picker.png)![ColorPicker preview](https://ui.nuxt.com/components/dark/color-picker.png)ColorPicker](https://ui.nuxt.com/components/color-picker) [![CommandPalette preview](https://ui.nuxt.com/components/light/command-palette.png)![CommandPalette preview](https://ui.nuxt.com/components/dark/command-palette.png)CommandPalette](https://ui.nuxt.com/components/command-palette) [![Container preview](https://ui.nuxt.com/components/light/container.png)![Container preview](https://ui.nuxt.com/components/dark/container.png)Container](https://ui.nuxt.com/components/container) [![ContextMenu preview](https://ui.nuxt.com/components/light/context-menu.png)![ContextMenu preview](https://ui.nuxt.com/components/dark/context-menu.png)ContextMenu](https://ui.nuxt.com/components/context-menu) [![Card preview](https://ui.nuxt.com/components/light/card.png)![Card preview](https://ui.nuxt.com/components/dark/card.png)Card](https://ui.nuxt.com/components/card) [![Carousel preview](https://ui.nuxt.com/components/light/carousel.png)![Carousel preview](https://ui.nuxt.com/components/dark/carousel.png)Carousel](https://ui.nuxt.com/components/carousel) [![Checkbox preview](https://ui.nuxt.com/components/light/checkbox.png)![Checkbox preview](https://ui.nuxt.com/components/dark/checkbox.png)Checkbox](https://ui.nuxt.com/components/checkbox) [![CheckboxGroup preview](https://ui.nuxt.com/components/light/checkbox-group.png)![CheckboxGroup preview](https://ui.nuxt.com/components/dark/checkbox-group.png)CheckboxGroup](https://ui.nuxt.com/components/checkbox-group) [![Chip preview](https://ui.nuxt.com/components/light/chip.png)![Chip preview](https://ui.nuxt.com/components/dark/chip.png)Chip](https://ui.nuxt.com/components/chip) [![Collapsible preview](https://ui.nuxt.com/components/light/collapsible.png)![Collapsible preview](https://ui.nuxt.com/components/dark/collapsible.png)Collapsible](https://ui.nuxt.com/components/collapsible) [![ColorPicker preview](https://ui.nuxt.com/components/light/color-picker.png)![ColorPicker preview](https://ui.nuxt.com/components/dark/color-picker.png)ColorPicker](https://ui.nuxt.com/components/color-picker) [![CommandPalette preview](https://ui.nuxt.com/components/light/command-palette.png)![CommandPalette preview](https://ui.nuxt.com/components/dark/command-palette.png)CommandPalette](https://ui.nuxt.com/components/command-palette) [![Container preview](https://ui.nuxt.com/components/light/container.png)![Container preview](https://ui.nuxt.com/components/dark/container.png)Container](https://ui.nuxt.com/components/container) [![ContextMenu preview](https://ui.nuxt.com/components/light/context-menu.png)![ContextMenu preview](https://ui.nuxt.com/components/dark/context-menu.png)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) [![rdjanuar](https://ipx.nuxt.com/s_112x112/gh_avatar/rdjanuar)](https://github.com/rdjanuar) [![larbish](https://ipx.nuxt.com/s_112x112/gh_avatar/larbish)](https://github.com/larbish) [![eduayme](https://ipx.nuxt.com/s_112x112/gh_avatar/eduayme)](https://github.com/eduayme) [![farnabaz](https://ipx.nuxt.com/s_112x112/gh_avatar/farnabaz)](https://github.com/farnabaz) [![ivanmaxlogiudice](https://ipx.nuxt.com/s_112x112/gh_avatar/ivanmaxlogiudice)](https://github.com/ivanmaxlogiudice) [![genu](https://ipx.nuxt.com/s_112x112/gh_avatar/genu)](https://github.com/genu) [![connerblanton](https://ipx.nuxt.com/s_112x112/gh_avatar/connerblanton)](https://github.com/connerblanton) [![maximepvrt](https://ipx.nuxt.com/s_112x112/gh_avatar/maximepvrt)](https://github.com/maximepvrt) [![antfu](https://ipx.nuxt.com/s_112x112/gh_avatar/antfu)](https://github.com/antfu) [![noook](https://ipx.nuxt.com/s_112x112/gh_avatar/noook)](https://github.com/noook) [![HugoRCD](https://ipx.nuxt.com/s_112x112/gh_avatar/HugoRCD)](https://github.com/HugoRCD) [![sandros94](https://ipx.nuxt.com/s_112x112/gh_avatar/sandros94)](https://github.com/sandros94) [![danielroe](https://ipx.nuxt.com/s_112x112/gh_avatar/danielroe)](https://github.com/danielroe) [![hywax](https://ipx.nuxt.com/s_112x112/gh_avatar/hywax)](https://github.com/hywax) [![malik-jouda](https://ipx.nuxt.com/s_112x112/gh_avatar/malik-jouda)](https://github.com/malik-jouda) [![benjamincanac](https://ipx.nuxt.com/s_112x112/gh_avatar/benjamincanac)](https://github.com/benjamincanac) [![romhml](https://ipx.nuxt.com/s_112x112/gh_avatar/romhml)](https://github.com/romhml) [![atinux](https://ipx.nuxt.com/s_112x112/gh_avatar/atinux)](https://github.com/atinux) [![smarroufin](https://ipx.nuxt.com/s_112x112/gh_avatar/smarroufin)](https://github.com/smarroufin) [![Haythamasalama](https://ipx.nuxt.com/s_112x112/gh_avatar/Haythamasalama)](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) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) --- # 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. ![undefined preview](https://ui.nuxt.com/components/light/alert.png)![undefined preview](https://ui.nuxt.com/components/dark/alert.png) [](https://ui.nuxt.com/components/alert) Avatar An img element with fallback and Nuxt Image support. ![undefined preview](https://ui.nuxt.com/components/light/avatar.png)![undefined preview](https://ui.nuxt.com/components/dark/avatar.png) [](https://ui.nuxt.com/components/avatar) AvatarGroup Stack multiple avatars in a group. ![undefined preview](https://ui.nuxt.com/components/light/avatar-group.png)![undefined preview](https://ui.nuxt.com/components/dark/avatar-group.png) [](https://ui.nuxt.com/components/avatar-group) Badge A short text to represent a status or a category. ![undefined preview](https://ui.nuxt.com/components/light/badge.png)![undefined preview](https://ui.nuxt.com/components/dark/badge.png) [](https://ui.nuxt.com/components/badge) Button A button element that can act as a link or trigger an action. ![undefined preview](https://ui.nuxt.com/components/light/button.png)![undefined preview](https://ui.nuxt.com/components/dark/button.png) [](https://ui.nuxt.com/components/button) ButtonGroup Group multiple button-like elements together. ![undefined preview](https://ui.nuxt.com/components/light/button-group.png)![undefined preview](https://ui.nuxt.com/components/dark/button-group.png) [](https://ui.nuxt.com/components/button-group) Calendar A calendar component for selecting single dates, multiple dates or date ranges. ![undefined preview](https://ui.nuxt.com/components/light/calendar.png)![undefined preview](https://ui.nuxt.com/components/dark/calendar.png) [](https://ui.nuxt.com/components/calendar) ChatPromptSubmitPRO A Button for submitting chat prompts with automatic status handling. ![undefined preview](https://ui.nuxt.com/components/light/chat-prompt-submit.png)![undefined preview](https://ui.nuxt.com/components/dark/chat-prompt-submit.png) [](https://ui.nuxt.com/components/chat-prompt-submit) Chip An indicator of a numeric value or a state. ![undefined preview](https://ui.nuxt.com/components/light/chip.png)![undefined preview](https://ui.nuxt.com/components/dark/chip.png) [](https://ui.nuxt.com/components/chip) Collapsible A collapsible element to toggle visibility of its content. ![undefined preview](https://ui.nuxt.com/components/light/collapsible.png)![undefined preview](https://ui.nuxt.com/components/dark/collapsible.png) [](https://ui.nuxt.com/components/collapsible) ColorModeAvatarPRO An Avatar with a different source for light and dark mode. ![undefined preview](https://ui.nuxt.com/components/light/color-mode-avatar.png)![undefined preview](https://ui.nuxt.com/components/dark/color-mode-avatar.png) [](https://ui.nuxt.com/components/color-mode-avatar) ColorModeButtonPRO A Button to switch between light and dark mode. ![undefined preview](https://ui.nuxt.com/components/light/color-mode-button.png)![undefined preview](https://ui.nuxt.com/components/dark/color-mode-button.png) [](https://ui.nuxt.com/components/color-mode-button) ColorModeImagePRO An image element with a different source for light and dark mode. ![undefined preview](https://ui.nuxt.com/components/light/color-mode-image.png)![undefined preview](https://ui.nuxt.com/components/dark/color-mode-image.png) [](https://ui.nuxt.com/components/color-mode-image) ColorModeSelectPRO A Select to switch between system, dark & light mode. ![undefined preview](https://ui.nuxt.com/components/light/color-mode-select.png)![undefined preview](https://ui.nuxt.com/components/dark/color-mode-select.png) [](https://ui.nuxt.com/components/color-mode-select) ColorModeSwitchPRO A switch to toggle between light and dark mode. ![undefined preview](https://ui.nuxt.com/components/light/color-mode-switch.png)![undefined preview](https://ui.nuxt.com/components/dark/color-mode-switch.png) [](https://ui.nuxt.com/components/color-mode-switch) ContentSearchButtonPRO A pre-styled Button to open the ContentSearch modal. ![undefined preview](https://ui.nuxt.com/components/light/content-search-button.png)![undefined preview](https://ui.nuxt.com/components/dark/content-search-button.png) [](https://ui.nuxt.com/components/content-search-button) DashboardSearchButtonPRO A pre-styled Button to open the DashboardSearch modal. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-search-button.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-search-button.png) [](https://ui.nuxt.com/components/dashboard-search-button) DashboardSidebarCollapsePRO A Button to collapse the sidebar on desktop. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-sidebar-collapse.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-sidebar-collapse.png) [](https://ui.nuxt.com/components/dashboard-sidebar-collapse) DashboardSidebarTogglePRO A Button to toggle the sidebar on mobile. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-sidebar-toggle.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-sidebar-toggle.png) [](https://ui.nuxt.com/components/dashboard-sidebar-toggle) Icon A component to display any icon from Iconify. ![undefined preview](https://ui.nuxt.com/components/light/icon.png)![undefined preview](https://ui.nuxt.com/components/dark/icon.png) [](https://ui.nuxt.com/components/icon) Kbd A kbd element to display a keyboard key. ![undefined preview](https://ui.nuxt.com/components/light/kbd.png)![undefined preview](https://ui.nuxt.com/components/dark/kbd.png) [](https://ui.nuxt.com/components/kbd) LocaleSelectPRO A Select to switch between locales. ![undefined preview](https://ui.nuxt.com/components/light/locale-select.png)![undefined preview](https://ui.nuxt.com/components/dark/locale-select.png) [](https://ui.nuxt.com/components/locale-select) Progress An indicator showing the progress of a task. ![undefined preview](https://ui.nuxt.com/components/light/progress.png)![undefined preview](https://ui.nuxt.com/components/dark/progress.png) [](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. ![undefined preview](https://ui.nuxt.com/components/light/auth-form.png)![undefined preview](https://ui.nuxt.com/components/dark/auth-form.png) [](https://ui.nuxt.com/components/auth-form) ChatPromptPRO An enhanced Textarea for submitting prompts in AI chat interfaces. ![undefined preview](https://ui.nuxt.com/components/light/chat-prompt.png)![undefined preview](https://ui.nuxt.com/components/dark/chat-prompt.png) [](https://ui.nuxt.com/components/chat-prompt) Checkbox An input element to toggle between checked and unchecked states. ![undefined preview](https://ui.nuxt.com/components/light/checkbox.png)![undefined preview](https://ui.nuxt.com/components/dark/checkbox.png) [](https://ui.nuxt.com/components/checkbox) CheckboxGroup A set of checklist buttons to select multiple option from a list. ![undefined preview](https://ui.nuxt.com/components/light/checkbox-group.png)![undefined preview](https://ui.nuxt.com/components/dark/checkbox-group.png) [](https://ui.nuxt.com/components/checkbox-group) ColorPicker A component to select a color. ![undefined preview](https://ui.nuxt.com/components/light/color-picker.png)![undefined preview](https://ui.nuxt.com/components/dark/color-picker.png) [](https://ui.nuxt.com/components/color-picker) Form A form component with built-in validation and submission handling. ![undefined preview](https://ui.nuxt.com/components/light/form.png)![undefined preview](https://ui.nuxt.com/components/dark/form.png) [](https://ui.nuxt.com/components/form) FormField A wrapper for form elements that provides validation and error handling. ![undefined preview](https://ui.nuxt.com/components/light/form-field.png)![undefined preview](https://ui.nuxt.com/components/dark/form-field.png) [](https://ui.nuxt.com/components/form-field) Input An input element to enter text. ![undefined preview](https://ui.nuxt.com/components/light/input.png)![undefined preview](https://ui.nuxt.com/components/dark/input.png) [](https://ui.nuxt.com/components/input) InputMenu An autocomplete input with real-time suggestions. ![undefined preview](https://ui.nuxt.com/components/light/input-menu.png)![undefined preview](https://ui.nuxt.com/components/dark/input-menu.png) [](https://ui.nuxt.com/components/input-menu) InputNumber Input numerical values with a customizable range. ![undefined preview](https://ui.nuxt.com/components/light/input-number.png)![undefined preview](https://ui.nuxt.com/components/dark/input-number.png) [](https://ui.nuxt.com/components/input-number) PinInput An input element to enter a pin. ![undefined preview](https://ui.nuxt.com/components/light/pin-input.png)![undefined preview](https://ui.nuxt.com/components/dark/pin-input.png) [](https://ui.nuxt.com/components/pin-input) RadioGroup A set of radio buttons to select a single option from a list. ![undefined preview](https://ui.nuxt.com/components/light/radio-group.png)![undefined preview](https://ui.nuxt.com/components/dark/radio-group.png) [](https://ui.nuxt.com/components/radio-group) Select A select element to choose from a list of options. ![undefined preview](https://ui.nuxt.com/components/light/select.png)![undefined preview](https://ui.nuxt.com/components/dark/select.png) [](https://ui.nuxt.com/components/select) SelectMenu An advanced searchable select element. ![undefined preview](https://ui.nuxt.com/components/light/select-menu.png)![undefined preview](https://ui.nuxt.com/components/dark/select-menu.png) [](https://ui.nuxt.com/components/select-menu) Slider An input to select a numeric value within a range. ![undefined preview](https://ui.nuxt.com/components/light/slider.png)![undefined preview](https://ui.nuxt.com/components/dark/slider.png) [](https://ui.nuxt.com/components/slider) Switch A control that toggles between two states. ![undefined preview](https://ui.nuxt.com/components/light/switch.png)![undefined preview](https://ui.nuxt.com/components/dark/switch.png) [](https://ui.nuxt.com/components/switch) Textarea A textarea element to input multi-line text. ![undefined preview](https://ui.nuxt.com/components/light/textarea.png)![undefined preview](https://ui.nuxt.com/components/dark/textarea.png) [](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. ![undefined preview](https://ui.nuxt.com/components/light/accordion.png)![undefined preview](https://ui.nuxt.com/components/dark/accordion.png) [](https://ui.nuxt.com/components/accordion) BlogPostPRO A customizable article to display in a blog page. ![undefined preview](https://ui.nuxt.com/components/light/blog-post.png)![undefined preview](https://ui.nuxt.com/components/dark/blog-post.png) [](https://ui.nuxt.com/components/blog-post) Carousel A carousel with motion and swipe built using Embla. ![undefined preview](https://ui.nuxt.com/components/light/carousel.png)![undefined preview](https://ui.nuxt.com/components/dark/carousel.png) [](https://ui.nuxt.com/components/carousel) ChatMessagePRO Display a chat message with icon, avatar, and actions. ![undefined preview](https://ui.nuxt.com/components/light/chat-message.png)![undefined preview](https://ui.nuxt.com/components/dark/chat-message.png) [](https://ui.nuxt.com/components/chat-message) PageAccordionPRO A pre-styled Accordion to display in your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-accordion.png)![undefined preview](https://ui.nuxt.com/components/dark/page-accordion.png) [](https://ui.nuxt.com/components/page-accordion) PageCardPRO A pre-styled card component that displays a title, description and optional link. ![undefined preview](https://ui.nuxt.com/components/light/page-card.png)![undefined preview](https://ui.nuxt.com/components/dark/page-card.png) [](https://ui.nuxt.com/components/page-card) PageCTAPRO A call to action section to display in your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-cta.png)![undefined preview](https://ui.nuxt.com/components/dark/page-cta.png) [](https://ui.nuxt.com/components/page-cta) PageFeaturePRO A component to showcase key features of your application. ![undefined preview](https://ui.nuxt.com/components/light/page-feature.png)![undefined preview](https://ui.nuxt.com/components/dark/page-feature.png) [](https://ui.nuxt.com/components/page-feature) PageHeaderPRO A responsive header for your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-header.png)![undefined preview](https://ui.nuxt.com/components/dark/page-header.png) [](https://ui.nuxt.com/components/page-header) PageHeroPRO A responsive hero for your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-hero.png)![undefined preview](https://ui.nuxt.com/components/dark/page-hero.png) [](https://ui.nuxt.com/components/page-hero) PageLogosPRO A list of logos or images to display on your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-logos.png)![undefined preview](https://ui.nuxt.com/components/dark/page-logos.png) [](https://ui.nuxt.com/components/page-logos) PageMarqueePRO A component to create infinite scrolling content. ![undefined preview](https://ui.nuxt.com/components/light/page-marquee.png)![undefined preview](https://ui.nuxt.com/components/dark/page-marquee.png) [](https://ui.nuxt.com/components/page-marquee) PageSectionPRO A responsive section for your pages. ![undefined preview](https://ui.nuxt.com/components/light/page-section.png)![undefined preview](https://ui.nuxt.com/components/dark/page-section.png) [](https://ui.nuxt.com/components/page-section) PricingPlanPRO A customizable pricing plan to display in a pricing page. ![undefined preview](https://ui.nuxt.com/components/light/pricing-plan.png)![undefined preview](https://ui.nuxt.com/components/dark/pricing-plan.png) [](https://ui.nuxt.com/components/pricing-plan) PricingTablePRO A responsive pricing table component that displays tiered pricing plans with feature comparisons. ![undefined preview](https://ui.nuxt.com/components/light/pricing-table.png)![undefined preview](https://ui.nuxt.com/components/dark/pricing-table.png) [](https://ui.nuxt.com/components/pricing-table) Table A responsive table element to display data in rows and columns. ![undefined preview](https://ui.nuxt.com/components/light/table.png)![undefined preview](https://ui.nuxt.com/components/dark/table.png) [](https://ui.nuxt.com/components/table) Timeline A component that displays a sequence of events with dates, titles, icons or avatars. ![undefined preview](https://ui.nuxt.com/components/light/timeline.png)![undefined preview](https://ui.nuxt.com/components/dark/timeline.png) [](https://ui.nuxt.com/components/timeline) Tree A tree view component to display and interact with hierarchical data structures. ![undefined preview](https://ui.nuxt.com/components/light/tree.png)![undefined preview](https://ui.nuxt.com/components/dark/tree.png) [](https://ui.nuxt.com/components/tree) UserPRO Display user information with name, description and avatar. ![undefined preview](https://ui.nuxt.com/components/light/user.png)![undefined preview](https://ui.nuxt.com/components/dark/user.png) [](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. ![undefined preview](https://ui.nuxt.com/components/light/breadcrumb.png)![undefined preview](https://ui.nuxt.com/components/dark/breadcrumb.png) [](https://ui.nuxt.com/components/breadcrumb) ChatPalettePRO A chat palette to create a chatbot interface inside an overlay. ![undefined preview](https://ui.nuxt.com/components/light/chat-palette.png)![undefined preview](https://ui.nuxt.com/components/dark/chat-palette.png) [](https://ui.nuxt.com/components/chat-palette) CommandPalette A command palette with full-text search powered by Fuse.js for efficient fuzzy matching. ![undefined preview](https://ui.nuxt.com/components/light/command-palette.png)![undefined preview](https://ui.nuxt.com/components/dark/command-palette.png) [](https://ui.nuxt.com/components/command-palette) ContentNavigationPRO An accordion-style navigation component for organizing page links. ![undefined preview](https://ui.nuxt.com/components/light/content-navigation.png)![undefined preview](https://ui.nuxt.com/components/dark/content-navigation.png) [](https://ui.nuxt.com/components/content-navigation) ContentSurroundPRO A pair of prev and next links to navigate between pages. ![undefined preview](https://ui.nuxt.com/components/light/content-surround.png)![undefined preview](https://ui.nuxt.com/components/dark/content-surround.png) [](https://ui.nuxt.com/components/content-surround) ContentTocPRO A sticky Table of Contents with automatic active anchor link highlighting. ![undefined preview](https://ui.nuxt.com/components/light/content-toc.png)![undefined preview](https://ui.nuxt.com/components/dark/content-toc.png) [](https://ui.nuxt.com/components/content-toc) FooterColumnsPRO A list of links as columns to display in your Footer. ![undefined preview](https://ui.nuxt.com/components/light/footer-columns.png)![undefined preview](https://ui.nuxt.com/components/dark/footer-columns.png) [](https://ui.nuxt.com/components/footer-columns) Link A wrapper around with extra props. ![undefined preview](https://ui.nuxt.com/components/light/link.png)![undefined preview](https://ui.nuxt.com/components/dark/link.png) [](https://ui.nuxt.com/components/link) NavigationMenu A list of links that can be displayed horizontally or vertically. ![undefined preview](https://ui.nuxt.com/components/light/navigation-menu.png)![undefined preview](https://ui.nuxt.com/components/dark/navigation-menu.png) [](https://ui.nuxt.com/components/navigation-menu) PageAnchorsPRO A list of anchors to be displayed in the page. ![undefined preview](https://ui.nuxt.com/components/light/page-anchors.png)![undefined preview](https://ui.nuxt.com/components/dark/page-anchors.png) [](https://ui.nuxt.com/components/page-anchors) PageLinksPRO A list of links to be displayed in the page. ![undefined preview](https://ui.nuxt.com/components/light/page-links.png)![undefined preview](https://ui.nuxt.com/components/dark/page-links.png) [](https://ui.nuxt.com/components/page-links) Pagination A list of buttons or links to navigate through pages. ![undefined preview](https://ui.nuxt.com/components/light/pagination.png)![undefined preview](https://ui.nuxt.com/components/dark/pagination.png) [](https://ui.nuxt.com/components/pagination) Stepper A set of steps that are used to indicate progress through a multi-step process. ![undefined preview](https://ui.nuxt.com/components/light/stepper.png)![undefined preview](https://ui.nuxt.com/components/dark/stepper.png) [](https://ui.nuxt.com/components/stepper) Tabs A set of tab panels that are displayed one at a time. ![undefined preview](https://ui.nuxt.com/components/light/tabs.png)![undefined preview](https://ui.nuxt.com/components/dark/tabs.png) [](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. ![undefined preview](https://ui.nuxt.com/components/light/content-search.png)![undefined preview](https://ui.nuxt.com/components/dark/content-search.png) [](https://ui.nuxt.com/components/content-search) ContextMenu A menu to display actions when right-clicking on an element. ![undefined preview](https://ui.nuxt.com/components/light/context-menu.png)![undefined preview](https://ui.nuxt.com/components/dark/context-menu.png) [](https://ui.nuxt.com/components/context-menu) DashboardSearchPRO A ready to use CommandPalette to add to your dashboard. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-search.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-search.png) [](https://ui.nuxt.com/components/dashboard-search) Drawer A drawer that smoothly slides in & out of the screen. ![undefined preview](https://ui.nuxt.com/components/light/drawer.png)![undefined preview](https://ui.nuxt.com/components/dark/drawer.png) [](https://ui.nuxt.com/components/drawer) DropdownMenu A menu to display actions when clicking on an element. ![undefined preview](https://ui.nuxt.com/components/light/dropdown-menu.png)![undefined preview](https://ui.nuxt.com/components/dark/dropdown-menu.png) [](https://ui.nuxt.com/components/dropdown-menu) Modal A dialog window that can be used to display a message or request user input. ![undefined preview](https://ui.nuxt.com/components/light/modal.png)![undefined preview](https://ui.nuxt.com/components/dark/modal.png) [](https://ui.nuxt.com/components/modal) Popover A non-modal dialog that floats around a trigger element. ![undefined preview](https://ui.nuxt.com/components/light/popover.png)![undefined preview](https://ui.nuxt.com/components/dark/popover.png) [](https://ui.nuxt.com/components/popover) Slideover A dialog that slides in from any side of the screen. ![undefined preview](https://ui.nuxt.com/components/light/slideover.png)![undefined preview](https://ui.nuxt.com/components/dark/slideover.png) [](https://ui.nuxt.com/components/slideover) Toast A succinct message to provide information or feedback to the user. ![undefined preview](https://ui.nuxt.com/components/light/toast.png)![undefined preview](https://ui.nuxt.com/components/dark/toast.png) [](https://ui.nuxt.com/components/toast) Tooltip A popup that reveals information when hovering over an element. ![undefined preview](https://ui.nuxt.com/components/light/tooltip.png)![undefined preview](https://ui.nuxt.com/components/dark/tooltip.png) [](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. ![undefined preview](https://ui.nuxt.com/components/light/app.png)![undefined preview](https://ui.nuxt.com/components/dark/app.png) [](https://ui.nuxt.com/components/app) BannerPRO Display a banner at the top of your website to inform users about important information. ![undefined preview](https://ui.nuxt.com/components/light/banner.png)![undefined preview](https://ui.nuxt.com/components/dark/banner.png) [](https://ui.nuxt.com/components/banner) BlogPostsPRO Display a list of blog posts in a responsive grid layout. ![undefined preview](https://ui.nuxt.com/components/light/blog-posts.png)![undefined preview](https://ui.nuxt.com/components/dark/blog-posts.png) [](https://ui.nuxt.com/components/blog-posts) Card Display content in a card with a header, body and footer. ![undefined preview](https://ui.nuxt.com/components/light/card.png)![undefined preview](https://ui.nuxt.com/components/dark/card.png) [](https://ui.nuxt.com/components/card) ChatMessagesPRO Display a list of chat messages, designed to work seamlessly with Vercel AI SDK. ![undefined preview](https://ui.nuxt.com/components/light/chat-messages.png)![undefined preview](https://ui.nuxt.com/components/dark/chat-messages.png) [](https://ui.nuxt.com/components/chat-messages) Container A container lets you center and constrain the width of your content. ![undefined preview](https://ui.nuxt.com/components/light/container.png)![undefined preview](https://ui.nuxt.com/components/dark/container.png) [](https://ui.nuxt.com/components/container) DashboardGroupPRO A fixed layout component that provides context for dashboard components with sidebar state management and persistence. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-group.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-group.png) [](https://ui.nuxt.com/components/dashboard-group) DashboardNavbarPRO A responsive navbar to display in a dashboard. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-navbar.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-navbar.png) [](https://ui.nuxt.com/components/dashboard-navbar) DashboardPanelPRO A resizable panel to display in a dashboard. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-panel.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-panel.png) [](https://ui.nuxt.com/components/dashboard-panel) DashboardResizeHandlePRO A handle to resize a sidebar or panel. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-resize-handle.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-resize-handle.png) [](https://ui.nuxt.com/components/dashboard-resize-handle) DashboardSidebarPRO A resizable and collapsible sidebar to display in a dashboard. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-sidebar.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-sidebar.png) [](https://ui.nuxt.com/components/dashboard-sidebar) DashboardToolbarPRO A toolbar to display under the navbar in a dashboard. ![undefined preview](https://ui.nuxt.com/components/light/dashboard-toolbar.png)![undefined preview](https://ui.nuxt.com/components/dark/dashboard-toolbar.png) [](https://ui.nuxt.com/components/dashboard-toolbar) ErrorPRO A pre-built error component with NuxtError support. ![undefined preview](https://ui.nuxt.com/components/light/error.png)![undefined preview](https://ui.nuxt.com/components/dark/error.png) [](https://ui.nuxt.com/components/error) FooterPRO A responsive footer component. ![undefined preview](https://ui.nuxt.com/components/light/footer.png)![undefined preview](https://ui.nuxt.com/components/dark/footer.png) [](https://ui.nuxt.com/components/footer) HeaderPRO A responsive header component. ![undefined preview](https://ui.nuxt.com/components/light/header.png)![undefined preview](https://ui.nuxt.com/components/dark/header.png) [](https://ui.nuxt.com/components/header) MainPRO A main element that fills the available viewport height. ![undefined preview](https://ui.nuxt.com/components/light/main.png)![undefined preview](https://ui.nuxt.com/components/dark/main.png) [](https://ui.nuxt.com/components/main) PagePRO A grid layout for your pages with left and right columns. ![undefined preview](https://ui.nuxt.com/components/light/page.png)![undefined preview](https://ui.nuxt.com/components/dark/page.png) [](https://ui.nuxt.com/components/page) PageAsidePRO A sticky aside to display your page navigation. ![undefined preview](https://ui.nuxt.com/components/light/page-aside.png)![undefined preview](https://ui.nuxt.com/components/dark/page-aside.png) [](https://ui.nuxt.com/components/page-aside) PageBodyPRO The main content of your page. ![undefined preview](https://ui.nuxt.com/components/light/page-body.png)![undefined preview](https://ui.nuxt.com/components/dark/page-body.png) [](https://ui.nuxt.com/components/page-body) PageColumnsPRO A responsive multi-column layout system for organizing content side-by-side. ![undefined preview](https://ui.nuxt.com/components/light/page-columns.png)![undefined preview](https://ui.nuxt.com/components/dark/page-columns.png) [](https://ui.nuxt.com/components/page-columns) PageGridPRO A responsive grid system for displaying content in a flexible layout. ![undefined preview](https://ui.nuxt.com/components/light/page-grid.png)![undefined preview](https://ui.nuxt.com/components/dark/page-grid.png) [](https://ui.nuxt.com/components/page-grid) PageListPRO A vertical list layout for displaying content in a stacked format. ![undefined preview](https://ui.nuxt.com/components/light/page-list.png)![undefined preview](https://ui.nuxt.com/components/dark/page-list.png) [](https://ui.nuxt.com/components/page-list) PricingPlansPRO Display a list of pricing plans in a responsive grid layout. ![undefined preview](https://ui.nuxt.com/components/light/pricing-plans.png)![undefined preview](https://ui.nuxt.com/components/dark/pricing-plans.png) [](https://ui.nuxt.com/components/pricing-plans) Separator Separates content horizontally or vertically. ![undefined preview](https://ui.nuxt.com/components/light/separator.png)![undefined preview](https://ui.nuxt.com/components/dark/separator.png) [](https://ui.nuxt.com/components/separator) Skeleton A placeholder to show while content is loading. ![undefined preview](https://ui.nuxt.com/components/light/skeleton.png)![undefined preview](https://ui.nuxt.com/components/dark/skeleton.png) [](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 ![Define local variables in the Nuxt UI Figma design kit](https://ui.nuxt.com/pro/figma/local-variables.png) ![Use color variables in the Nuxt UI Figma design kit](https://ui.nuxt.com/pro/figma/local-variables-result.png) 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) ![A component in the Nuxt UI Figma design kit](https://ui.nuxt.com/pro/figma/component.png) 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) ![A screenshot of Nuxt UI Code & Figma Kit](https://ui.nuxt.com/pro/figma/nuxt-ui-figma-to-code.png) 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) * ![Import the Nuxt UI Pro Figma design kit](https://ui.nuxt.com/pro/figma/step-1.png) 1 Download & Import ------------------- After purchasing, just extract the ZIP file and drag & drop it directly into Figma. * ![Customize the Nuxt UI Pro Figma design kit](https://ui.nuxt.com/pro/figma/step-2.png) 2 Customize to your brand ------------------------- Set your colors, typography, and styles to match your brand identity in minutes. * ![Design your website with the Nuxt UI Pro Figma design kit](https://ui.nuxt.com/pro/figma/step-3.png) 3 Design your website --------------------- Design beautiful interfaces with production-ready components. Drag, drop, and customize. * ![Share it with your developers with the Nuxt UI Pro Figma design kit](https://ui.nuxt.com/pro/figma/step-4.png) 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. ------------------------------------------------------- ![Springfield Clinic](https://ui.nuxt.com/pro/logos/springfieldclinic.svg)![Churnkey](https://ui.nuxt.com/pro/logos/churnkey.svg)![BOSCH](https://ui.nuxt.com/pro/logos/bosch.svg)![Blizzard](https://ui.nuxt.com/pro/logos/blizzard.svg)![Bodet](https://ui.nuxt.com/pro/logos/bodet.svg)![WinReality](https://ui.nuxt.com/pro/logos/win.svg)![Tower Research](https://ui.nuxt.com/pro/logos/tower.svg)![Liege Airport](https://ui.nuxt.com/pro/logos/liegeairport.svg)![University of Washington](https://ui.nuxt.com/pro/logos/wuniversity.svg)![Funda](https://ui.nuxt.com/pro/logos/funda.svg)![ExxonMobil](https://ui.nuxt.com/pro/logos/exxonmobil.svg)![Main Post](https://ui.nuxt.com/pro/logos/mainpost.svg)![INSEP](https://ui.nuxt.com/pro/logos/insep.svg)![Applause](https://ui.nuxt.com/pro/logos/applause.svg)![Instadapp](https://ui.nuxt.com/pro/logos/instadapp.svg) ![Springfield Clinic](https://ui.nuxt.com/pro/logos/springfieldclinic.svg)![Churnkey](https://ui.nuxt.com/pro/logos/churnkey.svg)![BOSCH](https://ui.nuxt.com/pro/logos/bosch.svg)![Blizzard](https://ui.nuxt.com/pro/logos/blizzard.svg)![Bodet](https://ui.nuxt.com/pro/logos/bodet.svg)![WinReality](https://ui.nuxt.com/pro/logos/win.svg)![Tower Research](https://ui.nuxt.com/pro/logos/tower.svg)![Liege Airport](https://ui.nuxt.com/pro/logos/liegeairport.svg)![University of Washington](https://ui.nuxt.com/pro/logos/wuniversity.svg)![Funda](https://ui.nuxt.com/pro/logos/funda.svg)![ExxonMobil](https://ui.nuxt.com/pro/logos/exxonmobil.svg)![Main Post](https://ui.nuxt.com/pro/logos/mainpost.svg)![INSEP](https://ui.nuxt.com/pro/logos/insep.svg)![Applause](https://ui.nuxt.com/pro/logos/applause.svg)![Instadapp](https://ui.nuxt.com/pro/logos/instadapp.svg) ![Springfield Clinic](https://ui.nuxt.com/pro/logos/springfieldclinic.svg)![Churnkey](https://ui.nuxt.com/pro/logos/churnkey.svg)![BOSCH](https://ui.nuxt.com/pro/logos/bosch.svg)![Blizzard](https://ui.nuxt.com/pro/logos/blizzard.svg)![Bodet](https://ui.nuxt.com/pro/logos/bodet.svg)![WinReality](https://ui.nuxt.com/pro/logos/win.svg)![Tower Research](https://ui.nuxt.com/pro/logos/tower.svg)![Liege Airport](https://ui.nuxt.com/pro/logos/liegeairport.svg)![University of Washington](https://ui.nuxt.com/pro/logos/wuniversity.svg)![Funda](https://ui.nuxt.com/pro/logos/funda.svg)![ExxonMobil](https://ui.nuxt.com/pro/logos/exxonmobil.svg)![Main Post](https://ui.nuxt.com/pro/logos/mainpost.svg)![INSEP](https://ui.nuxt.com/pro/logos/insep.svg)![Applause](https://ui.nuxt.com/pro/logos/applause.svg)![Instadapp](https://ui.nuxt.com/pro/logos/instadapp.svg) ![Springfield Clinic](https://ui.nuxt.com/pro/logos/springfieldclinic.svg)![Churnkey](https://ui.nuxt.com/pro/logos/churnkey.svg)![BOSCH](https://ui.nuxt.com/pro/logos/bosch.svg)![Blizzard](https://ui.nuxt.com/pro/logos/blizzard.svg)![Bodet](https://ui.nuxt.com/pro/logos/bodet.svg)![WinReality](https://ui.nuxt.com/pro/logos/win.svg)![Tower Research](https://ui.nuxt.com/pro/logos/tower.svg)![Liege Airport](https://ui.nuxt.com/pro/logos/liegeairport.svg)![University of Washington](https://ui.nuxt.com/pro/logos/wuniversity.svg)![Funda](https://ui.nuxt.com/pro/logos/funda.svg)![ExxonMobil](https://ui.nuxt.com/pro/logos/exxonmobil.svg)![Main Post](https://ui.nuxt.com/pro/logos/mainpost.svg)![INSEP](https://ui.nuxt.com/pro/logos/insep.svg)![Applause](https://ui.nuxt.com/pro/logos/applause.svg)![Instadapp](https://ui.nuxt.com/pro/logos/instadapp.svg) 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 ![TemPad Dev Nuxt UI Plugin](https://ui.nuxt.com/pro/figma/teampad-dev-nuxt-ui-plugin.gif) --- # 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 Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 1](https://ui.nuxt.com/pro/blocks/image1.png)![Nuxt UI Pro Screenshot 2](https://ui.nuxt.com/pro/blocks/image2.png)![Nuxt UI Pro Screenshot 3](https://ui.nuxt.com/pro/blocks/image3.png)![Nuxt UI Pro Screenshot 4](https://ui.nuxt.com/pro/blocks/image4.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 5](https://ui.nuxt.com/pro/blocks/image5.png)![Nuxt UI Pro Screenshot 6](https://ui.nuxt.com/pro/blocks/image6.png)![Nuxt UI Pro Screenshot 7](https://ui.nuxt.com/pro/blocks/image7.png)![Nuxt UI Pro Screenshot 8](https://ui.nuxt.com/pro/blocks/image8.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) ![Nuxt UI Pro Screenshot 9](https://ui.nuxt.com/pro/blocks/image9.png)![Nuxt UI Pro Screenshot 10](https://ui.nuxt.com/pro/blocks/image10.png)![Nuxt UI Pro Screenshot 11](https://ui.nuxt.com/pro/blocks/image11.png)![Nuxt UI Pro Screenshot 12](https://ui.nuxt.com/pro/blocks/image12.png) 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. ![Benjamin Code](https://pbs.twimg.com/profile_images/1607353032420769793/I8qQSUfQ_400x400.jpg) [](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 ![Portfolio](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3BvcnRmb2xpby10ZW1wbGF0ZS5udXh0LmRldiIsImlhdCI6MTc0NTkzNDczMX0.XDWnQoyVy3XVtKQD6PLQ8RFUwr4yr1QnVwPxRrjCrro.jpg?theme=light)![Portfolio](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3BvcnRmb2xpby10ZW1wbGF0ZS5udXh0LmRldiIsImlhdCI6MTc0NTkzNDczMX0.XDWnQoyVy3XVtKQD6PLQ8RFUwr4yr1QnVwPxRrjCrro.jpg?theme=dark) [](https://portfolio-template.nuxt.dev/) Chat ![Chat](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2NoYXQtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3NDI4NDY2ODB9.n4YCsoNz8xatox7UMoYZFNo7iS1mC_DT0h0A9cKRoTw.jpg?theme=light)![Chat](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2NoYXQtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3NDI4NDY2ODB9.n4YCsoNz8xatox7UMoYZFNo7iS1mC_DT0h0A9cKRoTw.jpg?theme=dark) [](https://chat-template.nuxt.dev/) Dashboard ![Dashboard](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2Rhc2hib2FyZC10ZW1wbGF0ZS5udXh0LmRldiIsImlhdCI6MTczOTQ2MzU2N30._VElt4uvLjvAMdnTLytCInOajMElzWDKbmvOaMZhZUI.jpg?theme=light)![Dashboard](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2Rhc2hib2FyZC10ZW1wbGF0ZS5udXh0LmRldiIsImlhdCI6MTczOTQ2MzU2N30._VElt4uvLjvAMdnTLytCInOajMElzWDKbmvOaMZhZUI.jpg?theme=dark) [](https://dashboard-template.nuxt.dev/) SaaS ![SaaS](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3NhYXMtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0NDh9.tgzUQaw6XswUPPVbOXazuWwoTHJODg155CYt1xfzIdM.jpg?theme=light)![SaaS](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3NhYXMtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0NDh9.tgzUQaw6XswUPPVbOXazuWwoTHJODg155CYt1xfzIdM.jpg?theme=dark) [](https://saas-template.nuxt.dev/) Landing ![Landing](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=light)![Landing](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2xhbmRpbmctdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjMzNzV9.ja2nUDVOoIFvyaMmg9Jn51uNMoYYt4WA1KWUQBWwUPo.jpg?theme=dark) [](https://landing-template.nuxt.dev/) Docs ![Docs](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=light)![Docs](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL2RvY3MtdGVtcGxhdGUubnV4dC5kZXYiLCJpYXQiOjE3Mzk0NjM0MTd9.ltVAqPgKG38O01X1zl6MXfrJc55nf9OewXNFjpZ_2JY.jpg?theme=dark) [](https://docs-template.nuxt.dev/) Starter ![Starter](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3VpLXByby1zdGFydGVyLm51eHQuZGV2IiwiaWF0IjoxNzM5NDYzMzk4fQ.XLzPkSW6nRbPW07QO1RkMwz_RAPA4KfeyrWrK3li9YI.jpg?theme=light)![Starter](https://assets.hub.nuxt.com/eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJodHRwczovL3VpLXByby1zdGFydGVyLm51eHQuZGV2IiwiaWF0IjoxNzM5NDYzMzk4fQ.XLzPkSW6nRbPW07QO1RkMwz_RAPA4KfeyrWrK3li9YI.jpg?theme=dark) [](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`

Show properties

* `position?: "top-left" \| "top-center" \| "top-right" \| "bottom-left" \| "bottom-center" \| "bottom-right"`

The position on the screen to display the toasts. Defaults to `'bottom-right'`.

* `expand?: boolean`

Expand the toasts to show multiple toasts at once. Defaults to `true`.

* `progress?: boolean`

Whether to show the progress bar on all toasts. Defaults to `true`.

* `portal?: string \| boolean \| HTMLElement`

Render the toaster in a portal. Defaults to `true`.

* `class?: any`

* `ui?: { viewport?: ClassNameValue; base?: ClassNameValue; }`

* `label?: string`

An author-localized label for each toast. Used to help screen reader users associate the interruption with a toast. Defaults to `'Notification'`.

* `duration?: number`

Time in milliseconds that each toast should remain visible for. Defaults to `5000`.

* `swipeThreshold?: number`

Distance in pixels that the swipe must pass before a close is triggered. Defaults to `50`. | | `locale` | | `Locale`

Show properties

* `name: string`

* `code: string`

* `dir: Direction`

* `messages: Messages` | | `portal` | `'body'` | `string \| HTMLElement` | | `scrollBody` | | `boolean \| ScrollBodyOption`

The global scroll body behavior of your application. This will be inherited by the related primitives.

Show properties

* `padding?: string \| number \| boolean`

* `margin?: string \| number \| boolean` | | `nonce` | | `string`

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 ![](https://github.com/benjamincanac.png) `` ### [Size](https://ui.nuxt.com/components/avatar#size) Use the `size` prop to set the size of the Avatar. size xl ![](https://github.com/benjamincanac.png) `` 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. ![Benjamin Canac](https://github.com/benjamincanac.png) `` ### [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. ![Benjamin Canac](https://github.com/benjamincanac.png) `` [API](https://ui.nuxt.com/components/avatar#api) ------------------------------------------------- ### [Props](https://ui.nuxt.com/components/avatar#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'span'` | `any`

The element or component this component should render as. | | `src` | | `string` | | `alt` | | `string` | | `icon` | | `string` | | `text` | | `string` | | `size` | `'md'` | `"md" \| "3xs" \| "2xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "2xl" \| "3xl"` | | `chip` | | `boolean \| ChipProps`

Show properties

* `as?: any`

The element or component this component should render as. Defaults to `'div'`.

* `text?: string \| number`

Display some text inside the chip.

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

Defaults to `'primary'`.

* `size?: "md" \| "3xs" \| "2xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "2xl" \| "3xl"`

Defaults to `'md'`.

* `position?: "top-left" \| "top-right" \| "bottom-left" \| "bottom-right"`

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 ` ` 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 ` ` ### [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 `` `` [API](https://ui.nuxt.com/components/accordion#api) ---------------------------------------------------- ### [Props](https://ui.nuxt.com/components/accordion#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

The element or component this component should render as. | | `items` | | `AccordionItem[]`

Show properties

* `label?: string`

* `icon?: string`

* `trailingIcon?: string`

* `slot?: string`

* `content?: string`

* `value?: string`

A unique value for the accordion item. Defaults to the index.

* `disabled?: boolean`

* `class?: any`

* `ui?: Pick<{ root?: ClassNameValue; item?: ClassNameValue; header?: ClassNameValue; trigger?: ClassNameValue; content?: ClassNameValue; body?: ClassNameValue; leadingIcon?: ClassNameValue; trailingIcon?: ClassNameValue; label?: ClassNameValue; }, "body" \| ... 6 more ... \| "label">` | | `trailingIcon` | `appConfig.ui.icons.chevronDown` | `string`

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. ![Neil Richter](https://github.com/noook.png)![Romain Hamel](https://github.com/romhml.png)![Benjamin Canac](https://github.com/benjamincanac.png) `` ### [Size](https://ui.nuxt.com/components/avatar-group#size) Use the `size` prop to change the size of all the avatars. size xl ![Neil Richter](https://github.com/noook.png)![Romain Hamel](https://github.com/romhml.png)![Benjamin Canac](https://github.com/benjamincanac.png) `` ### [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![Romain Hamel](https://github.com/romhml.png)![Benjamin Canac](https://github.com/benjamincanac.png) `` [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. ![Neil Richter](https://github.com/noook.png)![Romain Hamel](https://github.com/romhml.png)![Benjamin Canac](https://github.com/benjamincanac.png) `` ### [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. ![Neil Richter](https://github.com/noook.png) ![Romain Hamel](https://github.com/romhml.png) ![Benjamin Canac](https://github.com/benjamincanac.png) `` ### [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. [![Neil Richter](https://github.com/noook.png)](https://github.com/noook) [![Romain Hamel](https://github.com/romhml.png)](https://github.com/romhml) [![Benjamin Canac](https://github.com/benjamincanac.png)](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 ![](https://github.com/nuxt.png) 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'`.

* `src?: string`

* `alt?: string`

* `icon?: string`

* `text?: string`

* `size?: "2xl" \| "md" \| "3xs" \| "2xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "3xl"`

Defaults to `'md'`.

* `chip?: boolean \| ChipProps`

* `class?: any`

* `style?: any`

* `ui?: { root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }` | | `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `variant` | `'solid'` | `"solid" \| "outline" \| "soft" \| "subtle"` | | `orientation` | `'vertical'` | `"vertical" \| "horizontal"`

The orientation between the content and the actions. | | `actions` | | `ButtonProps[]`

Display a list of actions:

* under the title and description when orientation is `vertical`
* next to the close button when orientation is `horizontal``{ size: 'xs' }`

Show properties

* `label?: string`

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

Defaults to `'primary'`.

* `activeColor?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

* `variant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

Defaults to `'solid'`.

* `activeVariant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

* `size?: "md" \| "xs" \| "sm" \| "lg" \| "xl"`

Defaults to `'md'`.

* `square?: boolean`

Render the button with equal padding on all sides.

* `block?: boolean`

Render the button full width.

* `loadingAuto?: boolean`

Set loading state automatically based on the `@click` promise state

* `class?: any`

* `ui?: { base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }`

* `icon?: string`

Display an icon based on the `leading` and `trailing` props.

* `avatar?: AvatarProps`

Display an avatar on the left side.

* `leading?: boolean`

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?: string`

The icon when the `loading` prop is `true`. Defaults to `appConfig.ui.icons.loading`.

* `type?: "reset" \| "submit" \| "button"`

The type of the button when not a link. Defaults to `'button'`.

* `disabled?: boolean`

* `as?: any`

The element or component this component should render as when not a link. Defaults to `'button'`.

* `to?: string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`

Route Location the link should navigate to when clicked on.

* `active?: boolean`

Force the link to be active independent of the current route.

* `target?: "_blank" \| "_parent" \| "_self" \| "_top" \| (string & {}) \| null`

Where to display the linked URL, as the name for a browsing context. | | `close` | `false` | `boolean \| Partial`

Display a close button to dismiss the alert. `{ size: 'md', color: 'neutral', variant: 'link' }` | | `closeIcon` | `appConfig.ui.icons.close` | `string`

The icon displayed in the close button. | | `ui` | | `{ root?: ClassNameValue; wrapper?: ClassNameValue; title?: ClassNameValue; description?: ClassNameValue; icon?: ClassNameValue; avatar?: ClassNameValue; avatarSize?: ClassNameValue; actions?: ClassNameValue; close?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/alert#slots) | Slot | Type | | --- | --- | | `leading` | `{}` | | `title` | `{}` | | `description` | `{}` | | `actions` | `{}` | | `close` | `{ ui: { root: (props?: Record \| undefined) => string; wrapper: (props?: Record \| undefined) => string; title: (props?: Record \| undefined) => string; ... 5 more ...; close: (props?: Record<...> \| undefined) => string; }; }` | ### [Emits](https://ui.nuxt.com/components/alert#emits) | Event | Type | | --- | --- | | `update:open` | `[value: boolean]` | [Theme](https://ui.nuxt.com/components/alert#theme) ---------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { alert: { slots: { root: 'relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5', wrapper: 'min-w-0 flex-1 flex flex-col', title: 'text-sm font-medium', description: 'text-sm opacity-90', icon: 'shrink-0 size-5', avatar: 'shrink-0', avatarSize: '2xl', actions: 'flex flex-wrap gap-1.5 shrink-0', close: 'p-0' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, orientation: { horizontal: { root: 'items-center', actions: 'items-center' }, vertical: { root: 'items-start', actions: 'items-start mt-2.5' } }, title: { true: { description: 'mt-1' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: { root: 'bg-primary text-inverted' } }, { color: 'primary', variant: 'outline', class: { root: 'text-primary ring ring-inset ring-primary/25' } }, { color: 'primary', variant: 'soft', class: { root: 'bg-primary/10 text-primary' } }, { color: 'primary', variant: 'subtle', class: { root: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' } }, { color: 'neutral', variant: 'solid', class: { root: 'text-inverted bg-inverted' } }, { color: 'neutral', variant: 'outline', class: { root: 'text-highlighted bg-default ring ring-inset ring-default' } }, { color: 'neutral', variant: 'soft', class: { root: 'text-highlighted bg-elevated/50' } }, { color: 'neutral', variant: 'subtle', class: { root: 'text-highlighted bg-elevated/50 ring ring-inset ring-accented' } } ], defaultVariants: { color: 'primary', variant: 'solid' } } } })` 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: { alert: { slots: { root: 'relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5', wrapper: 'min-w-0 flex-1 flex flex-col', title: 'text-sm font-medium', description: 'text-sm opacity-90', icon: 'shrink-0 size-5', avatar: 'shrink-0', avatarSize: '2xl', actions: 'flex flex-wrap gap-1.5 shrink-0', close: 'p-0' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, orientation: { horizontal: { root: 'items-center', actions: 'items-center' }, vertical: { root: 'items-start', actions: 'items-start mt-2.5' } }, title: { true: { description: 'mt-1' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: { root: 'bg-primary text-inverted' } }, { color: 'primary', variant: 'outline', class: { root: 'text-primary ring ring-inset ring-primary/25' } }, { color: 'primary', variant: 'soft', class: { root: 'bg-primary/10 text-primary' } }, { color: 'primary', variant: 'subtle', class: { root: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' } }, { color: 'neutral', variant: 'solid', class: { root: 'text-inverted bg-inverted' } }, { color: 'neutral', variant: 'outline', class: { root: 'text-highlighted bg-default ring ring-inset ring-default' } }, { color: 'neutral', variant: 'soft', class: { root: 'text-highlighted bg-elevated/50' } }, { color: 'neutral', variant: 'subtle', class: { root: 'text-highlighted bg-elevated/50 ring ring-inset ring-accented' } } ], defaultVariants: { color: 'primary', variant: 'solid' } } } }) ] })` 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: { alert: { slots: { root: 'relative overflow-hidden w-full rounded-lg p-4 flex gap-2.5', wrapper: 'min-w-0 flex-1 flex flex-col', title: 'text-sm font-medium', description: 'text-sm opacity-90', icon: 'shrink-0 size-5', avatar: 'shrink-0', avatarSize: '2xl', actions: 'flex flex-wrap gap-1.5 shrink-0', close: 'p-0' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, orientation: { horizontal: { root: 'items-center', actions: 'items-center' }, vertical: { root: 'items-start', actions: 'items-start mt-2.5' } }, title: { true: { description: 'mt-1' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: { root: 'bg-primary text-inverted' } }, { color: 'primary', variant: 'outline', class: { root: 'text-primary ring ring-inset ring-primary/25' } }, { color: 'primary', variant: 'soft', class: { root: 'bg-primary/10 text-primary' } }, { color: 'primary', variant: 'subtle', class: { root: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' } }, { color: 'neutral', variant: 'solid', class: { root: 'text-inverted bg-inverted' } }, { color: 'neutral', variant: 'outline', class: { root: 'text-highlighted bg-default ring ring-inset ring-default' } }, { color: 'neutral', variant: 'soft', class: { root: 'text-highlighted bg-elevated/50' } }, { color: 'neutral', variant: 'subtle', class: { root: 'text-highlighted bg-elevated/50 ring ring-inset ring-accented' } } ], defaultVariants: { color: 'primary', variant: 'solid' } } } }) ] })` Expand code [](https://github.com/nuxt/ui/blob/v3/src/theme/alert.ts "Compound variants") Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub. [Accordion\ \ A stacked set of collapsible panels.](https://ui.nuxt.com/components/accordion) [Avatar\ \ An img element with fallback and Nuxt Image support.](https://ui.nuxt.com/components/avatar) --- # Vue Breadcrumb Component - Nuxt UI Breadcrumb ========== [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Breadcrumb.vue) A hierarchy of links to navigate through a website. [Usage](https://ui.nuxt.com/components/breadcrumb#usage) --------------------------------------------------------- ### [Items](https://ui.nuxt.com/components/breadcrumb#items) Use the `items` prop as an array of objects with the following properties: * `label?: string` * `icon?: string` * `avatar?: AvatarProps` * [`slot?: string`](https://ui.nuxt.com/components/breadcrumb#with-custom-slot) * `class?: any` * `ui?: { item?: ClassNameValue, link?: ClassNameValue, linkLeadingIcon?: ClassNameValue, linkLeadingAvatar?: ClassNameValue, linkLabel?: ClassNameValue, separator?: ClassNameValue, separatorIcon?: ClassNameValue }` You can pass any property from the [Link](https://ui.nuxt.com/components/link#props) component such as `to`, `target`, etc. ` ` A `span` is rendered instead of a link when the `to` property is not defined. ### [Separator Icon](https://ui.nuxt.com/components/breadcrumb#separator-icon) Use the `separator-icon` prop to customize the [Icon](https://ui.nuxt.com/components/icon) between each item. Defaults to `i-lucide-chevron-right`. separatorIcon ` ` [](https://ui.nuxt.com/getting-started/icons/nuxt#theme) You can customize this icon globally in your `app.config.ts` under `ui.icons.chevronRight` key. [](https://ui.nuxt.com/getting-started/icons/vue#theme) You can customize this icon globally in your `vite.config.ts` under `ui.icons.chevronRight` key. [Examples](https://ui.nuxt.com/components/breadcrumb#examples) --------------------------------------------------------------- ### [With separator slot](https://ui.nuxt.com/components/breadcrumb#with-separator-slot) Use the `#separator` slot to customize the separator between each item. ` ` ### [With custom slot](https://ui.nuxt.com/components/breadcrumb#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` ` ` [](https://ui.nuxt.com/components/breadcrumb#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/breadcrumb#api) ----------------------------------------------------- ### [Props](https://ui.nuxt.com/components/breadcrumb#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'nav'` | `any`

The element or component this component should render as. | | `items` | | `BreadcrumbItem[]`

Show properties

* `label?: string`

* `icon?: string`

* `avatar?: AvatarProps`

* `slot?: string`

* `class?: any`

* `ui?: Pick<{ root?: ClassNameValue; list?: ClassNameValue; item?: ClassNameValue; link?: ClassNameValue; linkLeadingIcon?: ClassNameValue; ... 4 more ...; separatorIcon?: ClassNameValue; }, "separatorIcon" \| ... 5 more ... \| "separator">`

* `as?: any`

The element or component this component should render as when not a link. Defaults to `'button'`.

* `to?: string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`

Route Location the link should navigate to when clicked on.

* `type?: "reset" \| "submit" \| "button"`

The type of the button when not a link. Defaults to `'button'`.

* `disabled?: boolean`

* `active?: boolean`

Force the link to be active independent of the current route.

* `target?: "_blank" \| "_parent" \| "_self" \| "_top" \| (string & {}) \| null`

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 `` 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 `` ### [Variant](https://ui.nuxt.com/components/badge#variant) Use the `variant` props to change the variant of the Badge. color neutral variant outline Badge `` ### [Size](https://ui.nuxt.com/components/badge#size) Use the `size` prop to change the size of the Badge. size xl 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 `` 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 `` ### [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 ![](https://github.com/nuxt.png) 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 `` [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. | | `label` | | `string \| number` | | `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `variant` | `'solid'` | `"solid" \| "outline" \| "soft" \| "subtle"` | | `size` | `'md'` | `"md" \| "xs" \| "sm" \| "lg" \| "xl"` | | `square` | | `boolean`

Render the badge with equal padding on all sides. | | `icon` | | `string`

Display an icon based on the `leading` and `trailing` props. | | `avatar` | | `AvatarProps`

Display an avatar on the left side.

Show properties

* `as?: any`

The element or component this component should render as. Defaults to `'span'`.

* `src?: string`

* `alt?: string`

* `icon?: string`

* `text?: string`

* `size?: "md" \| "3xs" \| "2xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "2xl" \| "3xl"`

Defaults to `'md'`.

* `chip?: boolean \| ChipProps`

* `class?: any`

* `style?: any`

* `ui?: { root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }` | | `leading` | | `boolean`

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. | | `ui` | | `{ base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/badge#slots) | Slot | Type | | --- | --- | | `leading` | `{}` | | `default` | `{}` | | `trailing` | `{}` | [Theme](https://ui.nuxt.com/components/badge#theme) ---------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { badge: { slots: { base: 'font-medium inline-flex items-center', label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, size: { xs: { base: 'text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, sm: { base: 'text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, md: { base: 'text-xs px-2 py-1 gap-1 rounded-md', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, lg: { base: 'text-sm px-2 py-1 gap-1.5 rounded-md', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'text-base px-2.5 py-1 gap-1.5 rounded-md', leadingIcon: 'size-6', leadingAvatarSize: '2xs', trailingIcon: 'size-6' } }, square: { true: '' } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'bg-primary text-inverted' }, { color: 'primary', variant: 'outline', class: 'text-primary ring ring-inset ring-primary/50' }, { color: 'primary', variant: 'soft', class: 'bg-primary/10 text-primary' }, { color: 'primary', variant: 'subtle', class: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated' }, { size: 'xs', square: true, class: 'p-0.5' }, { size: 'sm', square: true, class: 'p-1' }, { size: 'md', square: true, class: 'p-1' }, { size: 'lg', square: true, class: 'p-1' }, { size: 'xl', square: true, class: 'p-1' } ], defaultVariants: { color: 'primary', variant: 'solid', 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: { badge: { slots: { base: 'font-medium inline-flex items-center', label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, size: { xs: { base: 'text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, sm: { base: 'text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, md: { base: 'text-xs px-2 py-1 gap-1 rounded-md', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, lg: { base: 'text-sm px-2 py-1 gap-1.5 rounded-md', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'text-base px-2.5 py-1 gap-1.5 rounded-md', leadingIcon: 'size-6', leadingAvatarSize: '2xs', trailingIcon: 'size-6' } }, square: { true: '' } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'bg-primary text-inverted' }, { color: 'primary', variant: 'outline', class: 'text-primary ring ring-inset ring-primary/50' }, { color: 'primary', variant: 'soft', class: 'bg-primary/10 text-primary' }, { color: 'primary', variant: 'subtle', class: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated' }, { size: 'xs', square: true, class: 'p-0.5' }, { size: 'sm', square: true, class: 'p-1' }, { size: 'md', square: true, class: 'p-1' }, { size: 'lg', square: true, class: 'p-1' }, { size: 'xl', square: true, class: 'p-1' } ], defaultVariants: { color: 'primary', variant: 'solid', 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: { badge: { slots: { base: 'font-medium inline-flex items-center', label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '' }, size: { xs: { base: 'text-[8px]/3 px-1 py-0.5 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, sm: { base: 'text-[10px]/3 px-1.5 py-1 gap-1 rounded-sm', leadingIcon: 'size-3', leadingAvatarSize: '3xs', trailingIcon: 'size-3' }, md: { base: 'text-xs px-2 py-1 gap-1 rounded-md', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, lg: { base: 'text-sm px-2 py-1 gap-1.5 rounded-md', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'text-base px-2.5 py-1 gap-1.5 rounded-md', leadingIcon: 'size-6', leadingAvatarSize: '2xs', trailingIcon: 'size-6' } }, square: { true: '' } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'bg-primary text-inverted' }, { color: 'primary', variant: 'outline', class: 'text-primary ring ring-inset ring-primary/50' }, { color: 'primary', variant: 'soft', class: 'bg-primary/10 text-primary' }, { color: 'primary', variant: 'subtle', class: 'bg-primary/10 text-primary ring ring-inset ring-primary/25' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated' }, { size: 'xs', square: true, class: 'p-0.5' }, { size: 'sm', square: true, class: 'p-1' }, { size: 'md', square: true, class: 'p-1' }, { size: 'lg', square: true, class: 'p-1' }, { size: 'xl', square: true, class: 'p-1' } ], defaultVariants: { color: 'primary', variant: 'solid', size: 'md' } } } }) ] })` Expand code [](https://github.com/nuxt/ui/blob/v3/src/theme/badge.ts "Compound variants") Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub. [AvatarGroup\ \ Stack multiple avatars in a group.](https://ui.nuxt.com/components/avatar-group) [Breadcrumb\ \ A hierarchy of links to navigate through a website.](https://ui.nuxt.com/components/breadcrumb) --- # Vue Card Component - Nuxt UI Card ==== [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Card.vue) Display content in a card with a header, body and footer. [Usage](https://ui.nuxt.com/components/card#usage) --------------------------------------------------- `` ### [Variant](https://ui.nuxt.com/components/card#variant) Use the `variant` prop to change the variant of the Card. variant subtle `` [API](https://ui.nuxt.com/components/card#api) ----------------------------------------------- ### [Props](https://ui.nuxt.com/components/card#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `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 `` 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 `` ### [Variant](https://ui.nuxt.com/components/button#variant) Use the `variant` prop to change the variant of the Button. color neutral variant outline Button `` ### [Size](https://ui.nuxt.com/components/button#size) Use the `size` prop to change the size of the Button. size xl 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 `` 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 `` 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 ![](https://github.com/nuxt.png) 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 ![](https://github.com/nuxt.png) `` ### [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) `` 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 `` You can also use the `active-class` and `inactive-class` props to customize the active state. active true activeClass inactiveClass 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 `` Use the `loading-auto` prop to show the loading icon automatically while the `@click` promise is pending. Button ` ` This also works with the [Form](https://ui.nuxt.com/components/form) component. Full name 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 `` [](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 `` [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 `` ### [`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 `` [API](https://ui.nuxt.com/components/button#api) ------------------------------------------------- ### [Props](https://ui.nuxt.com/components/button#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'button'` | `any`

The element or component this component should render as when not a link. | | `label` | | `string` | | `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `activeColor` | | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `variant` | `'solid'` | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"` | | `activeVariant` | | `"link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"` | | `size` | `'md'` | `"md" \| "xs" \| "sm" \| "lg" \| "xl"` | | `square` | | `boolean`

Render the button with equal padding on all sides. | | `block` | | `boolean`

Render the button full width. | | `loadingAuto` | | `boolean`

Set loading state automatically based on the `@click` promise state | | `icon` | | `string`

Display an icon based on the `leading` and `trailing` props. | | `avatar` | | `AvatarProps`

Display an avatar on the left side.

Show properties

* `as?: any`

The element or component this component should render as. Defaults to `'span'`.

* `src?: string`

* `alt?: string`

* `icon?: string`

* `text?: string`

* `size?: "2xs" \| "md" \| "3xs" \| "xs" \| "sm" \| "lg" \| "xl" \| "2xl" \| "3xl"`

Defaults to `'md'`.

* `chip?: boolean \| ChipProps`

* `class?: any`

* `style?: any`

* `ui?: { root?: ClassNameValue; image?: ClassNameValue; fallback?: ClassNameValue; icon?: ClassNameValue; }` | | `leading` | | `boolean`

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 & {}`

Where to display the linked URL, as the name for a browsing context. | | `ui` | | `{ base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }` | [](https://github.com/nuxt/ui/blob/v3/src/runtime/components/Link.vue#L13) The `Button` component extends the `Link` component. Check out the source code on GitHub. ### [Slots](https://ui.nuxt.com/components/button#slots) | Slot | Type | | --- | --- | | `leading` | `{}` | | `default` | `{}` | | `trailing` | `{}` | [Theme](https://ui.nuxt.com/components/button#theme) ----------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { button: { slots: { base: [ 'rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75', 'transition-colors' ], label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '', ghost: '', link: '' }, size: { xs: { base: 'px-2 py-1 text-xs gap-1', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, sm: { base: 'px-2.5 py-1.5 text-xs gap-1.5', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, md: { base: 'px-2.5 py-1.5 text-sm gap-1.5', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, lg: { base: 'px-3 py-2 text-sm gap-2', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'px-3 py-2 text-base gap-2', leadingIcon: 'size-6', leadingAvatarSize: 'xs', trailingIcon: 'size-6' } }, block: { true: { base: 'w-full justify-center', trailingIcon: 'ms-auto' } }, square: { true: '' }, leading: { true: '' }, trailing: { true: '' }, loading: { true: '' }, active: { true: { base: '' }, false: { base: '' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary' }, { color: 'primary', variant: 'outline', class: 'ring ring-inset ring-primary/50 text-primary hover:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'soft', class: 'text-primary bg-primary/10 hover:bg-primary/15 focus:outline-none focus-visible:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10' }, { color: 'primary', variant: 'subtle', class: 'text-primary ring ring-inset ring-primary/25 bg-primary/10 hover:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'ghost', class: 'text-primary hover:bg-primary/10 focus:outline-none focus-visible:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent' }, { color: 'primary', variant: 'link', class: 'text-primary hover:text-primary/75 disabled:text-primary aria-disabled:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted hover:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default hover:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated hover:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'ghost', class: 'text-default hover:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent' }, { color: 'neutral', variant: 'link', class: 'text-muted hover:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted' }, { size: 'xs', square: true, class: 'p-1' }, { size: 'sm', square: true, class: 'p-1.5' }, { size: 'md', square: true, class: 'p-1.5' }, { size: 'lg', square: true, class: 'p-2' }, { size: 'xl', square: true, class: 'p-2' }, { loading: true, leading: true, class: { leadingIcon: 'animate-spin' } }, { loading: true, leading: false, trailing: true, class: { trailingIcon: 'animate-spin' } } ], defaultVariants: { color: 'primary', variant: 'solid', 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: { button: { slots: { base: [ 'rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75', 'transition-colors' ], label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '', ghost: '', link: '' }, size: { xs: { base: 'px-2 py-1 text-xs gap-1', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, sm: { base: 'px-2.5 py-1.5 text-xs gap-1.5', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, md: { base: 'px-2.5 py-1.5 text-sm gap-1.5', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, lg: { base: 'px-3 py-2 text-sm gap-2', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'px-3 py-2 text-base gap-2', leadingIcon: 'size-6', leadingAvatarSize: 'xs', trailingIcon: 'size-6' } }, block: { true: { base: 'w-full justify-center', trailingIcon: 'ms-auto' } }, square: { true: '' }, leading: { true: '' }, trailing: { true: '' }, loading: { true: '' }, active: { true: { base: '' }, false: { base: '' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary' }, { color: 'primary', variant: 'outline', class: 'ring ring-inset ring-primary/50 text-primary hover:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'soft', class: 'text-primary bg-primary/10 hover:bg-primary/15 focus:outline-none focus-visible:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10' }, { color: 'primary', variant: 'subtle', class: 'text-primary ring ring-inset ring-primary/25 bg-primary/10 hover:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'ghost', class: 'text-primary hover:bg-primary/10 focus:outline-none focus-visible:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent' }, { color: 'primary', variant: 'link', class: 'text-primary hover:text-primary/75 disabled:text-primary aria-disabled:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted hover:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default hover:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated hover:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'ghost', class: 'text-default hover:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent' }, { color: 'neutral', variant: 'link', class: 'text-muted hover:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted' }, { size: 'xs', square: true, class: 'p-1' }, { size: 'sm', square: true, class: 'p-1.5' }, { size: 'md', square: true, class: 'p-1.5' }, { size: 'lg', square: true, class: 'p-2' }, { size: 'xl', square: true, class: 'p-2' }, { loading: true, leading: true, class: { leadingIcon: 'animate-spin' } }, { loading: true, leading: false, trailing: true, class: { trailingIcon: 'animate-spin' } } ], defaultVariants: { color: 'primary', variant: 'solid', 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: { button: { slots: { base: [ 'rounded-md font-medium inline-flex items-center disabled:cursor-not-allowed aria-disabled:cursor-not-allowed disabled:opacity-75 aria-disabled:opacity-75', 'transition-colors' ], label: 'truncate', leadingIcon: 'shrink-0', leadingAvatar: 'shrink-0', leadingAvatarSize: '', trailingIcon: 'shrink-0' }, variants: { buttonGroup: { horizontal: 'not-only:first:rounded-e-none not-only:last:rounded-s-none not-last:not-first:rounded-none focus-visible:z-[1]', vertical: 'not-only:first:rounded-b-none not-only:last:rounded-t-none not-last:not-first:rounded-none focus-visible:z-[1]' }, color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, variant: { solid: '', outline: '', soft: '', subtle: '', ghost: '', link: '' }, size: { xs: { base: 'px-2 py-1 text-xs gap-1', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, sm: { base: 'px-2.5 py-1.5 text-xs gap-1.5', leadingIcon: 'size-4', leadingAvatarSize: '3xs', trailingIcon: 'size-4' }, md: { base: 'px-2.5 py-1.5 text-sm gap-1.5', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, lg: { base: 'px-3 py-2 text-sm gap-2', leadingIcon: 'size-5', leadingAvatarSize: '2xs', trailingIcon: 'size-5' }, xl: { base: 'px-3 py-2 text-base gap-2', leadingIcon: 'size-6', leadingAvatarSize: 'xs', trailingIcon: 'size-6' } }, block: { true: { base: 'w-full justify-center', trailingIcon: 'ms-auto' } }, square: { true: '' }, leading: { true: '' }, trailing: { true: '' }, loading: { true: '' }, active: { true: { base: '' }, false: { base: '' } } }, compoundVariants: [ { color: 'primary', variant: 'solid', class: 'text-inverted bg-primary hover:bg-primary/75 disabled:bg-primary aria-disabled:bg-primary focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary' }, { color: 'primary', variant: 'outline', class: 'ring ring-inset ring-primary/50 text-primary hover:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'soft', class: 'text-primary bg-primary/10 hover:bg-primary/15 focus:outline-none focus-visible:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10' }, { color: 'primary', variant: 'subtle', class: 'text-primary ring ring-inset ring-primary/25 bg-primary/10 hover:bg-primary/15 disabled:bg-primary/10 aria-disabled:bg-primary/10 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary' }, { color: 'primary', variant: 'ghost', class: 'text-primary hover:bg-primary/10 focus:outline-none focus-visible:bg-primary/10 disabled:bg-transparent aria-disabled:bg-transparent dark:disabled:bg-transparent dark:aria-disabled:bg-transparent' }, { color: 'primary', variant: 'link', class: 'text-primary hover:text-primary/75 disabled:text-primary aria-disabled:text-primary focus:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-primary' }, { color: 'neutral', variant: 'solid', class: 'text-inverted bg-inverted hover:bg-inverted/90 disabled:bg-inverted aria-disabled:bg-inverted focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-inverted' }, { color: 'neutral', variant: 'outline', class: 'ring ring-inset ring-accented text-default bg-default hover:bg-elevated disabled:bg-default aria-disabled:bg-default focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'soft', class: 'text-default bg-elevated hover:bg-accented/75 focus:outline-none focus-visible:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated' }, { color: 'neutral', variant: 'subtle', class: 'ring ring-inset ring-accented text-default bg-elevated hover:bg-accented/75 disabled:bg-elevated aria-disabled:bg-elevated focus:outline-none focus-visible:ring-2 focus-visible:ring-inverted' }, { color: 'neutral', variant: 'ghost', class: 'text-default hover:bg-elevated focus:outline-none focus-visible:bg-elevated hover:disabled:bg-transparent dark:hover:disabled:bg-transparent hover:aria-disabled:bg-transparent dark:hover:aria-disabled:bg-transparent' }, { color: 'neutral', variant: 'link', class: 'text-muted hover:text-default disabled:text-muted aria-disabled:text-muted focus:outline-none focus-visible:ring-inset focus-visible:ring-2 focus-visible:ring-inverted' }, { size: 'xs', square: true, class: 'p-1' }, { size: 'sm', square: true, class: 'p-1.5' }, { size: 'md', square: true, class: 'p-1.5' }, { size: 'lg', square: true, class: 'p-2' }, { size: 'xl', square: true, class: 'p-2' }, { loading: true, leading: true, class: { leadingIcon: 'animate-spin' } }, { loading: true, leading: false, trailing: true, class: { trailingIcon: 'animate-spin' } } ], defaultVariants: { color: 'primary', variant: 'solid', size: 'md' } } } }) ] })` Expand code [](https://github.com/nuxt/ui/blob/v3/src/theme/button.ts "Compound variants") Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub. [Breadcrumb\ \ A hierarchy of links to navigate through a website.](https://ui.nuxt.com/components/breadcrumb) [ButtonGroup\ \ Group multiple button-like elements together.](https://ui.nuxt.com/components/button-group) --- # Vue Checkbox Component - Nuxt UI Checkbox ======== [Checkbox](https://reka-ui.com/docs/components/checkbox) [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Checkbox.vue) An input element to toggle between checked and unchecked states. [Usage](https://ui.nuxt.com/components/checkbox#usage) ------------------------------------------------------- Use the `v-model` directive to control the checked state of the Checkbox. ` ` Use the `default-value` prop to set the initial value when you do not need to control its state. `` ### [Indeterminate](https://ui.nuxt.com/components/checkbox#indeterminate) Use the `indeterminate` value in the `v-model` directive or `default-value` prop to set the Checkbox to an [indeterminate state](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes) . `` ### [Indeterminate Icon](https://ui.nuxt.com/components/checkbox#indeterminate-icon) Use the `indeterminate-icon` prop to customize the indeterminate icon. Defaults to `i-lucide-minus`. indeterminateIcon `` [](https://ui.nuxt.com/getting-started/icons/nuxt#theme) You can customize this icon globally in your `app.config.ts` under `ui.icons.minus` key. [](https://ui.nuxt.com/getting-started/icons/vue#theme) You can customize this icon globally in your `vite.config.ts` under `ui.icons.minus` key. ### [Label](https://ui.nuxt.com/components/checkbox#label) Use the `label` prop to set the label of the Checkbox. label Check me `` When using the `required` prop, an asterisk is added next to the label. required true Check me `` ### [Description](https://ui.nuxt.com/components/checkbox#description) Use the `description` prop to set the description of the Checkbox. description Check me This is a checkbox. `` ### [Icon](https://ui.nuxt.com/components/checkbox#icon) Use the `icon` prop to set the icon of the Checkbox when it is checked. Defaults to `i-lucide-check`. icon Check me `` [](https://ui.nuxt.com/getting-started/icons/nuxt#theme) You can customize this icon globally in your `app.config.ts` under `ui.icons.check` key. [](https://ui.nuxt.com/getting-started/icons/vue#theme) You can customize this icon globally in your `vite.config.ts` under `ui.icons.check` key. ### [Color](https://ui.nuxt.com/components/checkbox#color) Use the `color` prop to change the color of the Checkbox. color neutral Check me `` ### [Variant New](https://ui.nuxt.com/components/checkbox#variant) Use the `variant` prop to change the variant of the Checkbox. color primary variant card Check me `` ### [Size](https://ui.nuxt.com/components/checkbox#size) Use the `size` prop to change the size of the Checkbox. size xl variant list Check me `` ### [Indicator New](https://ui.nuxt.com/components/checkbox#indicator) Use the `indicator` prop to change the position or hide the indicator. Defaults to `start`. indicator end variant card Check me `` ### [Disabled](https://ui.nuxt.com/components/checkbox#disabled) Use the `disabled` prop to disable the Checkbox. disabled true Check me `` [API](https://ui.nuxt.com/components/checkbox#api) --------------------------------------------------- ### [Props](https://ui.nuxt.com/components/checkbox#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

The element or component this component should render as. | | `label` | | `string` | | `description` | | `string` | | `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `variant` | `'list'` | `"card" \| "list"` | | `size` | `'md'` | `"xs" \| "sm" \| "md" \| "lg" \| "xl"` | | `indicator` | `'start'` | `"start" \| "end" \| "hidden"`

Position of the indicator. | | `icon` | `appConfig.ui.icons.check` | `string`

The icon displayed when checked. | | `indeterminateIcon` | `appConfig.ui.icons.minus` | `string`

The icon displayed when the checkbox is indeterminate. | | `disabled` | | `boolean`

When `true`, prevents the user from interacting with the checkbox | | `value` | `"on"` | `null \| string \| number \| bigint \| Record`

The value given as data when submitted with a `name`. | | `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. | | `id` | | `string`

Id of the element | | `defaultValue` | | `boolean \| "indeterminate"`

The value of the checkbox when it is initially rendered. Use when you do not need to control its value. | | `modelValue` | `undefined` | `boolean \| "indeterminate"` | | `ui` | | `{ root?: ClassNameValue; container?: ClassNameValue; base?: ClassNameValue; indicator?: ClassNameValue; icon?: ClassNameValue; wrapper?: ClassNameValue; label?: ClassNameValue; description?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/checkbox#slots) | Slot | Type | | --- | --- | | `label` | `{ label?: string \| undefined; }` | | `description` | `{ description?: string \| undefined; }` | ### [Emits](https://ui.nuxt.com/components/checkbox#emits) | Event | Type | | --- | --- | | `change` | `[payload: Event]` | | `update:modelValue` | `[value: boolean \| "indeterminate"]` | [Theme](https://ui.nuxt.com/components/checkbox#theme) ------------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { checkbox: { slots: { root: 'relative flex items-start', container: 'flex items-center', base: 'rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2', indicator: 'flex items-center justify-center size-full text-inverted', icon: 'shrink-0 size-full', wrapper: 'w-full', label: 'block font-medium text-default', description: 'text-muted' }, variants: { color: { primary: { base: 'focus-visible:outline-primary', indicator: 'bg-primary' }, secondary: { base: 'focus-visible:outline-secondary', indicator: 'bg-secondary' }, success: { base: 'focus-visible:outline-success', indicator: 'bg-success' }, info: { base: 'focus-visible:outline-info', indicator: 'bg-info' }, warning: { base: 'focus-visible:outline-warning', indicator: 'bg-warning' }, error: { base: 'focus-visible:outline-error', indicator: 'bg-error' }, neutral: { base: 'focus-visible:outline-inverted', indicator: 'bg-inverted' } }, variant: { list: { root: '' }, card: { root: 'border border-muted rounded-lg' } }, indicator: { start: { root: 'flex-row', wrapper: 'ms-2' }, end: { root: 'flex-row-reverse', wrapper: 'me-2' }, hidden: { base: 'sr-only', wrapper: 'text-center' } }, size: { xs: { base: 'size-3', container: 'h-4', wrapper: 'text-xs' }, sm: { base: 'size-3.5', container: 'h-4', wrapper: 'text-xs' }, md: { base: 'size-4', container: 'h-5', wrapper: 'text-sm' }, lg: { base: 'size-4.5', container: 'h-5', wrapper: 'text-sm' }, xl: { base: 'size-5', container: 'h-6', wrapper: 'text-base' } }, required: { true: { label: "after:content-['*'] after:ms-0.5 after:text-error" } }, disabled: { true: { base: 'cursor-not-allowed opacity-75', label: 'cursor-not-allowed opacity-75', description: 'cursor-not-allowed opacity-75' } }, checked: { true: '' } }, compoundVariants: [ { size: 'xs', variant: 'card', class: { root: 'p-2.5' } }, { size: 'sm', variant: 'card', class: { root: 'p-3' } }, { size: 'md', variant: 'card', class: { root: 'p-3.5' } }, { size: 'lg', variant: 'card', class: { root: 'p-4' } }, { size: 'xl', variant: 'card', class: { root: 'p-4.5' } }, { color: 'primary', variant: 'card', class: { root: 'has-data-[state=checked]:border-primary' } }, { color: 'neutral', variant: 'card', class: { root: 'has-data-[state=checked]:border-inverted' } }, { variant: 'card', disabled: true, class: { root: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', color: 'primary', variant: 'list', indicator: 'start' } } } })` 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: { checkbox: { slots: { root: 'relative flex items-start', container: 'flex items-center', base: 'rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2', indicator: 'flex items-center justify-center size-full text-inverted', icon: 'shrink-0 size-full', wrapper: 'w-full', label: 'block font-medium text-default', description: 'text-muted' }, variants: { color: { primary: { base: 'focus-visible:outline-primary', indicator: 'bg-primary' }, secondary: { base: 'focus-visible:outline-secondary', indicator: 'bg-secondary' }, success: { base: 'focus-visible:outline-success', indicator: 'bg-success' }, info: { base: 'focus-visible:outline-info', indicator: 'bg-info' }, warning: { base: 'focus-visible:outline-warning', indicator: 'bg-warning' }, error: { base: 'focus-visible:outline-error', indicator: 'bg-error' }, neutral: { base: 'focus-visible:outline-inverted', indicator: 'bg-inverted' } }, variant: { list: { root: '' }, card: { root: 'border border-muted rounded-lg' } }, indicator: { start: { root: 'flex-row', wrapper: 'ms-2' }, end: { root: 'flex-row-reverse', wrapper: 'me-2' }, hidden: { base: 'sr-only', wrapper: 'text-center' } }, size: { xs: { base: 'size-3', container: 'h-4', wrapper: 'text-xs' }, sm: { base: 'size-3.5', container: 'h-4', wrapper: 'text-xs' }, md: { base: 'size-4', container: 'h-5', wrapper: 'text-sm' }, lg: { base: 'size-4.5', container: 'h-5', wrapper: 'text-sm' }, xl: { base: 'size-5', container: 'h-6', wrapper: 'text-base' } }, required: { true: { label: "after:content-['*'] after:ms-0.5 after:text-error" } }, disabled: { true: { base: 'cursor-not-allowed opacity-75', label: 'cursor-not-allowed opacity-75', description: 'cursor-not-allowed opacity-75' } }, checked: { true: '' } }, compoundVariants: [ { size: 'xs', variant: 'card', class: { root: 'p-2.5' } }, { size: 'sm', variant: 'card', class: { root: 'p-3' } }, { size: 'md', variant: 'card', class: { root: 'p-3.5' } }, { size: 'lg', variant: 'card', class: { root: 'p-4' } }, { size: 'xl', variant: 'card', class: { root: 'p-4.5' } }, { color: 'primary', variant: 'card', class: { root: 'has-data-[state=checked]:border-primary' } }, { color: 'neutral', variant: 'card', class: { root: 'has-data-[state=checked]:border-inverted' } }, { variant: 'card', disabled: true, class: { root: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', color: 'primary', variant: 'list', indicator: 'start' } } } }) ] })` 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: { checkbox: { slots: { root: 'relative flex items-start', container: 'flex items-center', base: 'rounded-sm ring ring-inset ring-accented overflow-hidden focus-visible:outline-2 focus-visible:outline-offset-2', indicator: 'flex items-center justify-center size-full text-inverted', icon: 'shrink-0 size-full', wrapper: 'w-full', label: 'block font-medium text-default', description: 'text-muted' }, variants: { color: { primary: { base: 'focus-visible:outline-primary', indicator: 'bg-primary' }, secondary: { base: 'focus-visible:outline-secondary', indicator: 'bg-secondary' }, success: { base: 'focus-visible:outline-success', indicator: 'bg-success' }, info: { base: 'focus-visible:outline-info', indicator: 'bg-info' }, warning: { base: 'focus-visible:outline-warning', indicator: 'bg-warning' }, error: { base: 'focus-visible:outline-error', indicator: 'bg-error' }, neutral: { base: 'focus-visible:outline-inverted', indicator: 'bg-inverted' } }, variant: { list: { root: '' }, card: { root: 'border border-muted rounded-lg' } }, indicator: { start: { root: 'flex-row', wrapper: 'ms-2' }, end: { root: 'flex-row-reverse', wrapper: 'me-2' }, hidden: { base: 'sr-only', wrapper: 'text-center' } }, size: { xs: { base: 'size-3', container: 'h-4', wrapper: 'text-xs' }, sm: { base: 'size-3.5', container: 'h-4', wrapper: 'text-xs' }, md: { base: 'size-4', container: 'h-5', wrapper: 'text-sm' }, lg: { base: 'size-4.5', container: 'h-5', wrapper: 'text-sm' }, xl: { base: 'size-5', container: 'h-6', wrapper: 'text-base' } }, required: { true: { label: "after:content-['*'] after:ms-0.5 after:text-error" } }, disabled: { true: { base: 'cursor-not-allowed opacity-75', label: 'cursor-not-allowed opacity-75', description: 'cursor-not-allowed opacity-75' } }, checked: { true: '' } }, compoundVariants: [ { size: 'xs', variant: 'card', class: { root: 'p-2.5' } }, { size: 'sm', variant: 'card', class: { root: 'p-3' } }, { size: 'md', variant: 'card', class: { root: 'p-3.5' } }, { size: 'lg', variant: 'card', class: { root: 'p-4' } }, { size: 'xl', variant: 'card', class: { root: 'p-4.5' } }, { color: 'primary', variant: 'card', class: { root: 'has-data-[state=checked]:border-primary' } }, { color: 'neutral', variant: 'card', class: { root: 'has-data-[state=checked]:border-inverted' } }, { variant: 'card', disabled: true, class: { root: 'cursor-not-allowed opacity-75' } } ], defaultVariants: { size: 'md', color: 'primary', variant: 'list', indicator: 'start' } } } }) ] })` Expand code [](https://github.com/nuxt/ui/blob/v3/src/theme/checkbox.ts "Compound variants") Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub. [Carousel\ \ A carousel with motion and swipe built using Embla.](https://ui.nuxt.com/components/carousel) [CheckboxGroup\ \ A set of checklist buttons to select multiple option from a list.](https://ui.nuxt.com/components/checkbox-group) --- # Vue Chip Component - Nuxt UI Chip ==== [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Chip.vue) An indicator of a numeric value or a state. [Usage](https://ui.nuxt.com/components/chip#usage) --------------------------------------------------- Wrap any component with a Chip to display an indicator. `` ### [Color](https://ui.nuxt.com/components/chip#color) Use the `color` prop to change the color of the Chip. color neutral `` ### [Size](https://ui.nuxt.com/components/chip#size) Use the `size` prop to change the size of the Chip. size 3xl `` ### [Text](https://ui.nuxt.com/components/chip#text) Use the `text` prop to set the text of the Chip. text size 3xl 5 `` ### [Position](https://ui.nuxt.com/components/chip#position) Use the `position` prop to change the position of the Chip. position bottom-left `` ### [Inset](https://ui.nuxt.com/components/chip#inset) Use the `inset` prop to display the Chip inside the component. This is useful when dealing with rounded components. inset true ![](https://github.com/benjamincanac.png) `` ### [Standalone](https://ui.nuxt.com/components/chip#standalone) Use the `standalone` prop alongside the `inset` prop to display the Chip inline. standalone true inset true `` It's used this way in the [`CommandPalette`](https://ui.nuxt.com/components/command-palette) , [`InputMenu`](https://ui.nuxt.com/components/input-menu) , [`Select`](https://ui.nuxt.com/components/select) or [`SelectMenu`](https://ui.nuxt.com/components/select-menu) components for example. [Examples](https://ui.nuxt.com/components/chip#examples) --------------------------------------------------------- ### [Control visibility](https://ui.nuxt.com/components/chip#control-visibility) You can control the visibility of the Chip using the `show` prop. ![](https://github.com/benjamincanac.png) ` ` In this example, the Chip has a color per status and is displayed when the status is not `offline`. [API](https://ui.nuxt.com/components/chip#api) ----------------------------------------------- ### [Props](https://ui.nuxt.com/components/chip#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

The element or component this component should render as. | | `text` | | `string \| number`

Display some text inside the chip. | | `color` | `'primary'` | `"error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"` | | `size` | `'md'` | `"xs" \| "sm" \| "md" \| "lg" \| "xl" \| "3xs" \| "2xs" \| "2xl" \| "3xl"` | | `position` | `'top-right'` | `"top-right" \| "bottom-right" \| "top-left" \| "bottom-left"`

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[]`

Show properties

* `label?: string`

* `description?: string`

* `disabled?: boolean`

* `value?: string`

* `class?: any`

* `ui?: (Pick<{ root?: ClassNameValue; fieldset?: ClassNameValue; legend?: ClassNameValue; item?: ClassNameValue; }, "item"> & Omit<...>)` | | `size` | `'md'` | `"xs" \| "sm" \| "md" \| "lg" \| "xl"` | | `variant` | `'list'` | `"table" \| "list" \| "card"` | | `orientation` | `'vertical'` | `"horizontal" \| "vertical"`

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`

The icon displayed when checked. | | `ui` | | `{ root?: ClassNameValue; fieldset?: ClassNameValue; legend?: ClassNameValue; item?: ClassNameValue; } & { root?: ClassNameValue; ... 6 more ...; description?: ClassNameValue; }`

Show properties

* `root?: ClassNameValue`

* `fieldset?: ClassNameValue`

* `legend?: ClassNameValue`

* `item?: ClassNameValue`

* `container?: ClassNameValue`

* `base?: ClassNameValue`

* `indicator?: ClassNameValue`

* `icon?: ClassNameValue`

* `wrapper?: ClassNameValue`

* `label?: ClassNameValue`

* `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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` 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`: ![](https://picsum.photos/468/468?random=1) ![](https://picsum.photos/468/468?random=2) ![](https://picsum.photos/468/468?random=3) ![](https://picsum.photos/468/468?random=4) ![](https://picsum.photos/468/468?random=5) ![](https://picsum.photos/468/468?random=6) ` ` ### [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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` 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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` ### [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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` ### [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://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` [](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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` The number of dots is based on the number of slides displayed in the view: ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` [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/) . ![](https://picsum.photos/468/468?random=1) ![](https://picsum.photos/468/468?random=2) ![](https://picsum.photos/468/468?random=3) ![](https://picsum.photos/468/468?random=4) ![](https://picsum.photos/468/468?random=5) ![](https://picsum.photos/468/468?random=6) ` ` 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/) . ![](https://picsum.photos/468/468?random=1) ![](https://picsum.photos/468/468?random=2) ![](https://picsum.photos/468/468?random=3) ![](https://picsum.photos/468/468?random=4) ![](https://picsum.photos/468/468?random=5) ![](https://picsum.photos/468/468?random=6) ` ` 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/) . ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/320?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/320?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/320?random=6) ` ` 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/) . ![](https://picsum.photos/528/528?random=1) ![](https://picsum.photos/528/528?random=2) ![](https://picsum.photos/528/528?random=3) ![](https://picsum.photos/528/528?random=4) ![](https://picsum.photos/528/528?random=5) ![](https://picsum.photos/528/528?random=6) ` ` 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/) . ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` ### [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. ![](https://picsum.photos/468/468?random=1) ![](https://picsum.photos/468/468?random=2) ![](https://picsum.photos/468/468?random=3) ![](https://picsum.photos/468/468?random=4) ![](https://picsum.photos/468/468?random=5) ![](https://picsum.photos/468/468?random=6) ` ` [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. ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ![](https://picsum.photos/640/640?random=1) ![](https://picsum.photos/640/640?random=2) ![](https://picsum.photos/640/640?random=3) ![](https://picsum.photos/640/640?random=4) ![](https://picsum.photos/640/640?random=5) ![](https://picsum.photos/640/640?random=6) ` ` [API](https://ui.nuxt.com/components/carousel#api) --------------------------------------------------- ### [Props](https://ui.nuxt.com/components/carousel#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

The element or component this component should render as. | | `prev` | `{ size: 'md', color: 'neutral', variant: 'link' }` | `ButtonProps`

Configure the prev button when arrows are enabled.

Show properties

* `label?: string`

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

Defaults to `'primary'`.

* `activeColor?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

* `variant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

Defaults to `'solid'`.

* `activeVariant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

* `size?: "xs" \| "sm" \| "md" \| "lg" \| "xl"`

Defaults to `'md'`.

* `square?: boolean`

Render the button with equal padding on all sides.

* `block?: boolean`

Render the button full width.

* `loadingAuto?: boolean`

Set loading state automatically based on the `@click` promise state

* `class?: any`

* `ui?: { base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }`

* `icon?: string`

Display an icon based on the `leading` and `trailing` props.

* `avatar?: AvatarProps`

Display an avatar on the left side.

* `leading?: boolean`

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?: string`

The icon when the `loading` prop is `true`. Defaults to `appConfig.ui.icons.loading`.

* `active?: boolean`

Force the link to be active independent of the current route.

* `as?: any`

The element or component this component should render as when not a link. Defaults to `'button'`.

* `to?: string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`

Route Location the link should navigate to when clicked on.

* `type?: "reset" \| "submit" \| "button"`

The type of the button when not a link. Defaults to `'button'`.

* `disabled?: boolean`

* `target?: "_blank" \| "_parent" \| "_self" \| "_top" \| (string & {}) \| null`

Where to display the linked URL, as the name for a browsing context. | | `prevIcon` | `appConfig.ui.icons.arrowLeft` | `string`

The icon displayed in the prev button. | | `next` | `{ size: 'md', color: 'neutral', variant: 'link' }` | `ButtonProps`

Configure the next button when arrows are enabled.

Show properties

* `label?: string`

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

Defaults to `'primary'`.

* `activeColor?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

* `variant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

Defaults to `'solid'`.

* `activeVariant?: "link" \| "solid" \| "outline" \| "soft" \| "subtle" \| "ghost"`

* `size?: "xs" \| "sm" \| "md" \| "lg" \| "xl"`

Defaults to `'md'`.

* `square?: boolean`

Render the button with equal padding on all sides.

* `block?: boolean`

Render the button full width.

* `loadingAuto?: boolean`

Set loading state automatically based on the `@click` promise state

* `class?: any`

* `ui?: { base?: ClassNameValue; label?: ClassNameValue; leadingIcon?: ClassNameValue; leadingAvatar?: ClassNameValue; leadingAvatarSize?: ClassNameValue; trailingIcon?: ClassNameValue; }`

* `icon?: string`

Display an icon based on the `leading` and `trailing` props.

* `avatar?: AvatarProps`

Display an avatar on the left side.

* `leading?: boolean`

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?: string`

The icon when the `loading` prop is `true`. Defaults to `appConfig.ui.icons.loading`.

* `active?: boolean`

Force the link to be active independent of the current route.

* `as?: any`

The element or component this component should render as when not a link. Defaults to `'button'`.

* `to?: string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`

Route Location the link should navigate to when clicked on.

* `type?: "reset" \| "submit" \| "button"`

The type of the button when not a link. Defaults to `'button'`.

* `disabled?: boolean`

* `target?: "_blank" \| "_parent" \| "_self" \| "_top" \| (string & {}) \| null`

Where to display the linked URL, as the name for a browsing context. | | `nextIcon` | `appConfig.ui.icons.arrowRight` | `string`

The icon displayed in the next button. | | `arrows` | `false` | `boolean`

Display prev and next buttons to scroll the carousel. | | `dots` | `false` | `boolean`

Display dots to scroll to a specific slide. | | `orientation` | `'horizontal'` | `"vertical" \| "horizontal"`

The orientation of the carousel. | | `items` | | `CarouselItem[]`

Show properties

* `class?: any`

* `ui?: Pick<{ root?: ClassNameValue; viewport?: ClassNameValue; container?: ClassNameValue; item?: ClassNameValue; controls?: ClassNameValue; ... 4 more ...; dot?: ClassNameValue; }, "item">` | | `autoplay` | `false` | `boolean \| Partial>`

Enable Autoplay plugin

* [https://www.embla-carousel.com/plugins/autoplay/](https://www.embla-carousel.com/plugins/autoplay/) | | `autoScroll` | `false` | `boolean \| Partial>`

Enable Auto Scroll plugin

* [https://www.embla-carousel.com/plugins/auto-scroll/](https://www.embla-carousel.com/plugins/auto-scroll/) | | `autoHeight` | `false` | `boolean \| Partial, "breakpoints">; }; }>>`

Enable Auto Height plugin

* [https://www.embla-carousel.com/plugins/auto-height/](https://www.embla-carousel.com/plugins/auto-height/) | | `classNames` | `false` | `boolean \| Partial>`

Enable Class Names plugin

* [https://www.embla-carousel.com/plugins/class-names/](https://www.embla-carousel.com/plugins/class-names/) | | `fade` | `false` | `boolean \| Partial, "breakpoints">; }; }>>`

Enable Fade plugin

* [https://www.embla-carousel.com/plugins/fade/](https://www.embla-carousel.com/plugins/fade/) | | `wheelGestures` | `false` | `any`

Enable Wheel Gestures plugin

* [https://www.embla-carousel.com/plugins/wheel-gestures/](https://www.embla-carousel.com/plugins/wheel-gestures/) | | `align` | `'center'` | `"start" \| "center" \| "end" \| (viewSize: number, snapSize: number, index: number): number` | | `containScroll` | `'trimSnaps'` | `false \| "trimSnaps" \| "keepSnaps"` | | `slidesToScroll` | `1` | `number \| "auto"` | | `dragFree` | `false` | `boolean` | | `dragThreshold` | `10` | `number` | | `inViewThreshold` | `0` | `number \| number[]` | | `loop` | `false` | `boolean` | | `skipSnaps` | `false` | `boolean` | | `duration` | `25` | `number` | | `startIndex` | `0` | `number` | | `watchDrag` | `true` | `false \| true \| (emblaApi: EmblaCarouselType, evt: PointerEventType): boolean \| void` | | `watchResize` | `true` | `false \| true \| (emblaApi: EmblaCarouselType, entries: ResizeObserverEntry[]): boolean \| void` | | `watchSlides` | `true` | `false \| true \| (emblaApi: EmblaCarouselType, mutations: MutationRecord[]): boolean \| void` | | `watchFocus` | `true` | `false \| true \| (emblaApi: EmblaCarouselType, evt: FocusEvent): boolean \| void` | | `active` | `true` | `boolean` | | `breakpoints` | `{}` | `{ [key: string]: Omit \| null; ... 13 more ...; watchFocus: FocusHandlerOptionType; }>>, "breakpoints">; }` | | `ui` | | `{ root?: ClassNameValue; viewport?: ClassNameValue; container?: ClassNameValue; item?: ClassNameValue; controls?: ClassNameValue; ... 4 more ...; dot?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/carousel#slots) | Slot | Type | | --- | --- | | `default` | `{ item: CarouselItem; index: number; }` | ### [Emits](https://ui.nuxt.com/components/carousel#emits) | Event | Type | | --- | --- | | `select` | `[selectedIndex: number]` | ### [Expose](https://ui.nuxt.com/components/carousel#expose) You can access the typed component instance using [`useTemplateRef`](https://vuejs.org/api/composition-api-helpers.html#usetemplateref) . ` ` This will give you access to the following: | Name | Type | | --- | --- | | `emblaRef` | `Ref` | | `emblaApi` | [`Ref`](https://www.embla-carousel.com/api/methods/#typescript) | [Theme](https://ui.nuxt.com/components/carousel#theme) ------------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { carousel: { slots: { root: 'relative focus:outline-none', viewport: 'overflow-hidden', container: 'flex items-start', item: 'min-w-0 shrink-0 basis-full', controls: '', arrows: '', prev: 'absolute rounded-full', next: 'absolute rounded-full', dots: 'absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3', dot: [ 'cursor-pointer size-3 bg-accented rounded-full', 'transition' ] }, variants: { orientation: { vertical: { container: 'flex-col -mt-4', item: 'pt-4', prev: 'top-4 sm:-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90', next: 'bottom-4 sm:-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90' }, horizontal: { container: 'flex-row -ms-4', item: 'ps-4', prev: 'start-4 sm:-start-12 top-1/2 -translate-y-1/2', next: 'end-4 sm:-end-12 top-1/2 -translate-y-1/2' } }, active: { true: { dot: 'data-[state=active]:bg-inverted' } } } } } })` 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: { carousel: { slots: { root: 'relative focus:outline-none', viewport: 'overflow-hidden', container: 'flex items-start', item: 'min-w-0 shrink-0 basis-full', controls: '', arrows: '', prev: 'absolute rounded-full', next: 'absolute rounded-full', dots: 'absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3', dot: [ 'cursor-pointer size-3 bg-accented rounded-full', 'transition' ] }, variants: { orientation: { vertical: { container: 'flex-col -mt-4', item: 'pt-4', prev: 'top-4 sm:-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90', next: 'bottom-4 sm:-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90' }, horizontal: { container: 'flex-row -ms-4', item: 'ps-4', prev: 'start-4 sm:-start-12 top-1/2 -translate-y-1/2', next: 'end-4 sm:-end-12 top-1/2 -translate-y-1/2' } }, active: { true: { dot: 'data-[state=active]:bg-inverted' } } } } } }) ] })` 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: { carousel: { slots: { root: 'relative focus:outline-none', viewport: 'overflow-hidden', container: 'flex items-start', item: 'min-w-0 shrink-0 basis-full', controls: '', arrows: '', prev: 'absolute rounded-full', next: 'absolute rounded-full', dots: 'absolute inset-x-0 -bottom-7 flex flex-wrap items-center justify-center gap-3', dot: [ 'cursor-pointer size-3 bg-accented rounded-full', 'transition' ] }, variants: { orientation: { vertical: { container: 'flex-col -mt-4', item: 'pt-4', prev: 'top-4 sm:-top-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90', next: 'bottom-4 sm:-bottom-12 left-1/2 -translate-x-1/2 rotate-90 rtl:-rotate-90' }, horizontal: { container: 'flex-row -ms-4', item: 'ps-4', prev: 'start-4 sm:-start-12 top-1/2 -translate-y-1/2', next: 'end-4 sm:-end-12 top-1/2 -translate-y-1/2' } }, active: { true: { dot: 'data-[state=active]:bg-inverted' } } } } } }) ] })` Expand code [Card\ \ Display content in a card with a header, body and footer.](https://ui.nuxt.com/components/card) [Checkbox\ \ An input element to toggle between checked and unchecked states.](https://ui.nuxt.com/components/checkbox) --- # Vue ColorPicker Component - Nuxt UI ColorPicker =========== [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/ColorPicker.vue) A component to select a color. [Usage](https://ui.nuxt.com/components/color-picker#usage) ----------------------------------------------------------- Use the `v-model` directive to control the value of the ColorPicker. ` ` Use the `default-value` prop to set the initial value when you do not need to control its state. `` ### [RGB Format](https://ui.nuxt.com/components/color-picker#rgb-format) Use the `format` prop to set `rgb` value of the ColorPicker. ` ` ### [HSL Format](https://ui.nuxt.com/components/color-picker#hsl-format) Use the `format` prop to set `hsl` value of the ColorPicker. ` ` ### [CMYK Format](https://ui.nuxt.com/components/color-picker#cmyk-format) Use the `format` prop to set `cmyk` value of the ColorPicker. ` ` ### [CIELab Format](https://ui.nuxt.com/components/color-picker#cielab-format) Use the `format` prop to set `lab` value of the ColorPicker. ` ` ### [Throttle](https://ui.nuxt.com/components/color-picker#throttle) Use the `throttle` prop to set the throttle value of the ColorPicker. throttle ` ` ### [Size](https://ui.nuxt.com/components/color-picker#size) Use the `size` prop to set the size of the ColorPicker. size xl `` ### [Disabled](https://ui.nuxt.com/components/color-picker#disabled) Use the `disabled` prop to disable the ColorPicker. disabled true `` [Examples](https://ui.nuxt.com/components/color-picker#examples) ----------------------------------------------------------------- ### [As a Color chooser](https://ui.nuxt.com/components/color-picker#as-a-color-chooser) Use a [Button](https://ui.nuxt.com/components/button) and a [Popover](https://ui.nuxt.com/components/popover) component to create a color chooser. Choose color ` ` [API](https://ui.nuxt.com/components/color-picker#api) ------------------------------------------------------- ### [Props](https://ui.nuxt.com/components/color-picker#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

The element or component this component should render as. | | `throttle` | `50` | `number`

Throttle time in ms for the color picker | | `disabled` | | `boolean`

Disable the color picker | | `defaultValue` | `'#FFFFFF'` | `string`

The default value of the color picker | | `format` | `'hex'` | `"hex" \| "rgb" \| "hsl" \| "cmyk" \| "lab"`

Format of the color | | `size` | `'md'` | `"xs" \| "sm" \| "md" \| "lg" \| "xl"` | | `modelValue` | | `string` | | `ui` | | `{ root?: ClassNameValue; picker?: ClassNameValue; selector?: ClassNameValue; selectorBackground?: ClassNameValue; selectorThumb?: ClassNameValue; track?: ClassNameValue; trackThumb?: ClassNameValue; }` | ### [Emits](https://ui.nuxt.com/components/color-picker#emits) | Event | Type | | --- | --- | | `update:modelValue` | `[value: string \| undefined]` | [Theme](https://ui.nuxt.com/components/color-picker#theme) ----------------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { colorPicker: { slots: { root: 'data-[disabled]:opacity-75', picker: 'flex gap-4', selector: 'rounded-md touch-none', selectorBackground: 'w-full h-full relative rounded-md', selectorThumb: '-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed', track: 'w-[8px] relative rounded-md touch-none', trackThumb: 'absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed' }, variants: { size: { xs: { selector: 'w-38 h-38', track: 'h-38' }, sm: { selector: 'w-40 h-40', track: 'h-40' }, md: { selector: 'w-42 h-42', track: 'h-42' }, lg: { selector: 'w-44 h-44', track: 'h-44' }, xl: { selector: 'w-46 h-46', track: 'h-46' } } }, compoundVariants: [], 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: { colorPicker: { slots: { root: 'data-[disabled]:opacity-75', picker: 'flex gap-4', selector: 'rounded-md touch-none', selectorBackground: 'w-full h-full relative rounded-md', selectorThumb: '-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed', track: 'w-[8px] relative rounded-md touch-none', trackThumb: 'absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed' }, variants: { size: { xs: { selector: 'w-38 h-38', track: 'h-38' }, sm: { selector: 'w-40 h-40', track: 'h-40' }, md: { selector: 'w-42 h-42', track: 'h-42' }, lg: { selector: 'w-44 h-44', track: 'h-44' }, xl: { selector: 'w-46 h-46', track: 'h-46' } } }, compoundVariants: [], 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: { colorPicker: { slots: { root: 'data-[disabled]:opacity-75', picker: 'flex gap-4', selector: 'rounded-md touch-none', selectorBackground: 'w-full h-full relative rounded-md', selectorThumb: '-translate-y-1/2 -translate-x-1/2 absolute size-4 ring-2 ring-(--color-white) rounded-full cursor-pointer data-[disabled]:cursor-not-allowed', track: 'w-[8px] relative rounded-md touch-none', trackThumb: 'absolute transform -translate-y-1/2 -translate-x-[4px] rtl:translate-x-[4px] size-4 rounded-full ring-2 ring-(--color-white) cursor-pointer data-[disabled]:cursor-not-allowed' }, variants: { size: { xs: { selector: 'w-38 h-38', track: 'h-38' }, sm: { selector: 'w-40 h-40', track: 'h-40' }, md: { selector: 'w-42 h-42', track: 'h-42' }, lg: { selector: 'w-44 h-44', track: 'h-44' }, xl: { selector: 'w-46 h-46', track: 'h-46' } } }, compoundVariants: [], defaultVariants: { size: 'md' } } } }) ] })` Expand code [Collapsible\ \ A collapsible element to toggle visibility of its content.](https://ui.nuxt.com/components/collapsible) [CommandPalette\ \ A command palette with full-text search powered by Fuse.js for efficient fuzzy matching.](https://ui.nuxt.com/components/command-palette) --- # Vue Container Component - Nuxt UI Container ========= [GitHub](https://github.com/nuxt/ui/tree/v3/src/runtime/components/Container.vue) A container lets you center and constrain the width of your content. [Usage](https://ui.nuxt.com/components/container#usage) -------------------------------------------------------- `` [API](https://ui.nuxt.com/components/container#api) ---------------------------------------------------- ### [Props](https://ui.nuxt.com/components/container#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'div'` | `any`

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. ![](https://ui.nuxt.com/s_160x160/gh_avatar/benjamincanac) Benjamin Canac Bordeaux, France [](https://x.com/benjamincanac) [](https://bsky.app/profile/benjamincanac.dev) [](https://github.com/benjamincanac) [Sponsor](https://github.com/sponsors/benjamincanac) ![](https://ui.nuxt.com/s_160x160/gh_avatar/HugoRCD) 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) ![](https://ui.nuxt.com/s_160x160/gh_avatar/romhml) 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) ![](https://ui.nuxt.com/s_160x160/gh_avatar/sandros94) 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) ![](https://ui.nuxt.com/s_160x160/gh_avatar/genu) Eugen Istoc Atlanta, Washington DC [](https://x.com/eugenistoc) [](https://github.com/genu) [](http://www.eugenistoc.com/) [Sponsor](https://github.com/sponsors/genu) * * * ![](https://ui.nuxt.com/s_160x160/gh_avatar/atinux) atinux [](https://github.com/atinux) ![](https://ui.nuxt.com/s_160x160/gh_avatar/smarroufin) smarroufin [](https://github.com/smarroufin) ![](https://ui.nuxt.com/s_160x160/gh_avatar/Haythamasalama) Haythamasalama [](https://github.com/Haythamasalama) ![](https://ui.nuxt.com/s_160x160/gh_avatar/danielroe) danielroe [](https://github.com/danielroe) ![](https://ui.nuxt.com/s_160x160/gh_avatar/hywax) hywax [](https://github.com/hywax) ![](https://ui.nuxt.com/s_160x160/gh_avatar/malik-jouda) malik-jouda [](https://github.com/malik-jouda) ![](https://ui.nuxt.com/s_160x160/gh_avatar/connerblanton) connerblanton [](https://github.com/connerblanton) ![](https://ui.nuxt.com/s_160x160/gh_avatar/maximepvrt) maximepvrt [](https://github.com/maximepvrt) ![](https://ui.nuxt.com/s_160x160/gh_avatar/antfu) antfu [](https://github.com/antfu) ![](https://ui.nuxt.com/s_160x160/gh_avatar/noook) noook [](https://github.com/noook) ![](https://ui.nuxt.com/s_160x160/gh_avatar/rdjanuar) rdjanuar [](https://github.com/rdjanuar) ![](https://ui.nuxt.com/s_160x160/gh_avatar/larbish) larbish [](https://github.com/larbish) ![](https://ui.nuxt.com/s_160x160/gh_avatar/eduayme) eduayme [](https://github.com/eduayme) ![](https://ui.nuxt.com/s_160x160/gh_avatar/farnabaz) farnabaz [](https://github.com/farnabaz) ![](https://ui.nuxt.com/s_160x160/gh_avatar/ivanmaxlogiudice) ivanmaxlogiudice [](https://github.com/ivanmaxlogiudice) ![](https://ui.nuxt.com/s_160x160/gh_avatar/KeJunMao) KeJunMao [](https://github.com/KeJunMao) ![](https://ui.nuxt.com/s_160x160/gh_avatar/ineshbose) ineshbose [](https://github.com/ineshbose) ![](https://ui.nuxt.com/s_160x160/gh_avatar/DarkGhostHunter) DarkGhostHunter [](https://github.com/DarkGhostHunter) ![](https://ui.nuxt.com/s_160x160/gh_avatar/J-Michalek) J-Michalek [](https://github.com/J-Michalek) ![](https://ui.nuxt.com/s_160x160/gh_avatar/Silver343) Silver343 [](https://github.com/Silver343) ![](https://ui.nuxt.com/s_160x160/gh_avatar/zAlweNy26) zAlweNy26 [](https://github.com/zAlweNy26) ![](https://ui.nuxt.com/s_160x160/gh_avatar/maxsteinwand) maxsteinwand [](https://github.com/maxsteinwand) ![](https://ui.nuxt.com/s_160x160/gh_avatar/MuhammadM1998) MuhammadM1998 [](https://github.com/MuhammadM1998) ![](https://ui.nuxt.com/s_160x160/gh_avatar/Akryum) 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 `` 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 `` 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 `` DefaultMutedElevatedAccentedInverted `` DefaultMutedAccentedInverted `` 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 `` 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 ![](https://github.com/nuxt.png) `` 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 `` 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 `` 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 `` [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 `` [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 ![](https://github.com/benjamincanac.png)Benjamin Canacbenjamincanac![](https://github.com/smarroufin.png)Sylvain Marroufinsmarroufin![](https://github.com/atinux.png)Sébastien Chopinatinux![](https://github.com/romhml.png)Romain Hamelromhml![](https://github.com/Haythamasalama.png)Haytham A. SalamaHaythamasalama![](https://github.com/danielroe.png)Daniel Roedanielroe![](https://github.com/noook.png)Neil Richternoook ` ` Expand code ### [Multiple](https://ui.nuxt.com/components/command-palette#multiple) Use the `multiple` prop to allow multiple selections. Users ![](https://github.com/benjamincanac.png)Benjamin Canacbenjamincanac![](https://github.com/smarroufin.png)Sylvain Marroufinsmarroufin![](https://github.com/atinux.png)Sébastien Chopinatinux![](https://github.com/romhml.png)Romain Hamelromhml![](https://github.com/Haythamasalama.png)Haytham A. SalamaHaythamasalama![](https://github.com/danielroe.png)Daniel Roedanielroe![](https://github.com/noook.png)Neil 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 [![](https://github.com/benjamincanac.png)Benjamin Canacbenjamincanac](https://github.com/benjamincanac) [![](https://github.com/smarroufin.png)Sylvain Marroufinsmarroufin](https://github.com/smarroufin) [![](https://github.com/atinux.png)Sébastien Chopinatinux](https://github.com/atinux) [![](https://github.com/romhml.png)Romain Hamelromhml](https://github.com/romhml) [![](https://github.com/Haythamasalama.png)Haytham A. SalamaHaythamasalama](https://github.com/Haythamasalama) [![](https://github.com/danielroe.png)Daniel Roedanielroe](https://github.com/danielroe) [![](https://github.com/noook.png)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. [![](https://github.com/benjamincanac.png)Benjamin Canacbenjamincanac](https://github.com/benjamincanac) [![](https://github.com/atinux.png)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 ![](https://i.pravatar.cc/120?img=1)Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=2)Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=3)Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=4)Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=5)Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=6)Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=7)Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=8)Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=9)Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=10)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 ![](https://i.pravatar.cc/120?img=1)Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=2)Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=3)Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=4)Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=5)Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=6)Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=7)Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=8)Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=9)Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=10)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. ![](https://i.pravatar.cc/120?img=1)Leanne Graham[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=2)Ervin Howell[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=3)Clementine Bauch[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=4)Patricia Lebsack[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=5)Chelsey Dietrich[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=6)Mrs. Dennis Schulist[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=7)Kurtis Weissnat[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=8)Nicholas Runolfsdottir V[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=9)Glenna Reichert[\[email protected\]](https://ui.nuxt.com/cdn-cgi/l/email-protection) ![](https://i.pravatar.cc/120?img=10)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 [![](https://github.com/benjamincanac.png)Benjamin Canacbenjamincanac](https://github.com/benjamincanac) [![](https://github.com/smarroufin.png)Sylvain Marroufinsmarroufin](https://github.com/smarroufin) [![](https://github.com/atinux.png)Sébastien Chopinatinux](https://github.com/atinux) [![](https://github.com/romhml.png)Romain Hamelromhml](https://github.com/romhml) [![](https://github.com/Haythamasalama.png)Haytham A. SalamaHaythamasalama](https://github.com/Haythamasalama) [![](https://github.com/danielroe.png)Daniel Roedanielroe](https://github.com/danielroe) [![](https://github.com/noook.png)Neil Richternoook](https://github.com/noook) `` `` [](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`

Options for [useFuse](https://vueuse.org/integrations/useFuse)
. | | `labelKey` | `'label'` | `string`

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 icon when the `loading` prop is `true`. | | `searchTerm` | `''` | `string` | | `ui` | | `{ root?: ClassNameValue; input?: ClassNameValue; close?: ClassNameValue; content?: ClassNameValue; viewport?: ClassNameValue; ... 17 more ...; itemLabelSuffix?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/command-palette#slots) | Slot | Type | | --- | --- | | `empty` | `{ searchTerm?: string \| undefined; }` | | `close` | `{ ui: { root: (props?: Record \| undefined) => string; input: (props?: Record \| undefined) => string; close: (props?: Record \| undefined) => string; ... 19 more ...; itemLabelSuffix: (props?: Record<...> \| undefined) => string; }; }` | | `item` | `{ item: CommandPaletteItem; index: number; }` | | `item-leading` | `{ item: CommandPaletteItem; index: number; }` | | `item-label` | `{ item: CommandPaletteItem; index: number; }` | | `item-trailing` | `{ item: CommandPaletteItem; index: number; }` | ### [Emits](https://ui.nuxt.com/components/command-palette#emits) | Event | Type | | --- | --- | | `update:modelValue` | `[value: CommandPaletteItem]` | | `highlight` | `[payload: { ref: HTMLElement; value: CommandPaletteItem; } \| undefined]` | | `entryFocus` | `[event: CustomEvent]` | | `leave` | `[event: Event]` | | `update:open` | `[value: boolean]` | | `update:searchTerm` | `[value: string]` | [Theme](https://ui.nuxt.com/components/command-palette#theme) -------------------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { commandPalette: { slots: { root: 'flex flex-col min-h-0 min-w-0 divide-y divide-default', input: '[&>input]:h-12', close: '', content: 'relative overflow-hidden flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1 focus:outline-none', group: 'p-1 isolate', empty: 'py-6 text-center text-sm text-muted', label: 'p-1.5 text-xs font-semibold text-highlighted', item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0 size-5', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '2xs', itemLeadingChip: 'shrink-0 size-5', itemLeadingChipSize: 'md', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0 size-5', itemTrailingHighlightedIcon: 'shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0 gap-0.5', itemTrailingKbdsSize: 'md', itemLabel: 'truncate space-x-1 rtl:space-x-reverse text-dimmed', itemLabelBase: 'text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary', itemLabelPrefix: 'text-default', itemLabelSuffix: 'text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary' }, variants: { active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:not-group-data-disabled:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } } } } } })` 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: { commandPalette: { slots: { root: 'flex flex-col min-h-0 min-w-0 divide-y divide-default', input: '[&>input]:h-12', close: '', content: 'relative overflow-hidden flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1 focus:outline-none', group: 'p-1 isolate', empty: 'py-6 text-center text-sm text-muted', label: 'p-1.5 text-xs font-semibold text-highlighted', item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0 size-5', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '2xs', itemLeadingChip: 'shrink-0 size-5', itemLeadingChipSize: 'md', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0 size-5', itemTrailingHighlightedIcon: 'shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0 gap-0.5', itemTrailingKbdsSize: 'md', itemLabel: 'truncate space-x-1 rtl:space-x-reverse text-dimmed', itemLabelBase: 'text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary', itemLabelPrefix: 'text-default', itemLabelSuffix: 'text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary' }, variants: { active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:not-group-data-disabled:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } } } } } }) ] })` 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: { commandPalette: { slots: { root: 'flex flex-col min-h-0 min-w-0 divide-y divide-default', input: '[&>input]:h-12', close: '', content: 'relative overflow-hidden flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1 focus:outline-none', group: 'p-1 isolate', empty: 'py-6 text-center text-sm text-muted', label: 'p-1.5 text-xs font-semibold text-highlighted', item: 'group relative w-full flex items-center gap-1.5 p-1.5 text-sm select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0 size-5', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '2xs', itemLeadingChip: 'shrink-0 size-5', itemLeadingChipSize: 'md', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0 size-5', itemTrailingHighlightedIcon: 'shrink-0 size-5 text-dimmed hidden group-data-highlighted:inline-flex', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0 gap-0.5', itemTrailingKbdsSize: 'md', itemLabel: 'truncate space-x-1 rtl:space-x-reverse text-dimmed', itemLabelBase: 'text-highlighted [&>mark]:text-inverted [&>mark]:bg-primary', itemLabelPrefix: 'text-default', itemLabelSuffix: 'text-dimmed [&>mark]:text-inverted [&>mark]:bg-primary' }, variants: { active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:not-data-disabled:text-highlighted data-highlighted:not-data-disabled:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:not-group-data-disabled:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } } } } } }) ] })` Expand code [ColorPicker\ \ A component to select a color.](https://ui.nuxt.com/components/color-picker) [Container\ \ A container lets you center and constrain the width of your content.](https://ui.nuxt.com/components/container) --- # Vue ColorModeAvatar Component - Nuxt UI Pro ColorModeAvatarPRO ================== [Avatar](https://ui.nuxt.com/components/avatar) [GitHub](https://github.com/nuxt/ui-pro/blob/v3/src/runtime/components/color-mode/ColorModeAvatar.vue) An Avatar with a different source for light and dark mode. [Usage](https://ui.nuxt.com/components/color-mode-avatar#usage) ---------------------------------------------------------------- The ColorModeAvatar component extends the [Avatar](https://ui.nuxt.com/components/avatar) component, so you can pass any property such as `size`, `icon`, etc. Use the `light` and `dark` props to define the source for light and dark mode. light dark ![](https://github.com/vuejs.png)![](https://github.com/nuxt.png) `` Switch between light and dark mode to see the different images: System [API](https://ui.nuxt.com/components/color-mode-avatar#api) ------------------------------------------------------------ ### [Props](https://ui.nuxt.com/components/color-mode-avatar#props) | Prop | Default | Type | | --- | --- | --- | | `as` | `'span'` | `any`

The element or component this component should render as. | | `light` | | `string` | | `dark` | | `string` | | `icon` | | `string` | | `size` | `'md'` | `"md" \| "xs" \| "sm" \| "lg" \| "xl" \| "3xs" \| "2xs" \| "2xl" \| "3xl"` | | `alt` | | `string` | | `chip` | | `boolean \| ChipProps`

Show properties

* `as?: any`

The element or component this component should render as. Defaults to `'div'`.

* `text?: string \| number`

Display some text inside the chip.

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

Defaults to `'primary'`.

* `size?: "md" \| "xs" \| "sm" \| "lg" \| "xl" \| "3xs" \| "2xs" \| "2xl" \| "3xl"`

Defaults to `'md'`.

* `position?: "top-right" \| "bottom-right" \| "top-left" \| "bottom-left"`

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 ` ` 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 ` ` ### [Disabled](https://ui.nuxt.com/components/context-menu#disabled) Use the `disabled` prop to disable the ContextMenu. disabled true 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 ` ` 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 ` ` ### [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 ` ` [](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[][]`

Show properties

* `label?: string`

* `icon?: string`

* `color?: "error" \| "primary" \| "secondary" \| "success" \| "info" \| "warning" \| "neutral"`

* `avatar?: AvatarProps`

* `content?: (ContextMenuContentProps & Partial>)`

* `kbds?: (string )[] \| KbdProps[] \| undefined`

* `type?: "label" \| "separator" \| "link" \| "checkbox"`

The item type. Defaults to `'link'`.

* `slot?: string`

* `loading?: boolean`

* `disabled?: boolean`

* `checked?: boolean`

* `open?: boolean`

* `defaultOpen?: boolean`

* `children?: ArrayOrNested`

* `onSelect?: ((e: Event) => void)`

* `onUpdateChecked?: ((checked: boolean) => void)`

* `class?: any`

* `ui?: Pick<{ content?: ClassNameValue; viewport?: ClassNameValue; group?: ClassNameValue; label?: ClassNameValue; separator?: ClassNameValue; ... 9 more ...; itemLabelExternalIcon?: ClassNameValue; }, "label" \| ... 10 more ... \| "itemLabelExternalIcon">`

* `to?: string \| RouteLocationAsRelativeGeneric \| RouteLocationAsPathGeneric`

Route Location the link should navigate to when clicked on.

* `as?: any`

The element or component this component should render as when not a link. Defaults to `'button'`.

* `active?: boolean`

Force the link to be active independent of the current route.

* `target?: "_blank" \| "_parent" \| "_self" \| "_top" \| (string & {}) \| null`

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`.

* `onEscapeKeyDown?: ((event: KeyboardEvent) => void)`

* `onPointerDownOutside?: ((event: PointerDownOutsideEvent) => void)`

* `onFocusOutside?: ((event: FocusOutsideEvent) => void)`

* `onInteractOutside?: ((event: PointerDownOutsideEvent \| FocusOutsideEvent) => void)`

* `onCloseAutoFocus?: ((event: Event) => void)` | | `portal` | `true` | `string \| false \| true \| HTMLElement`

Render the menu in a portal. | | `labelKey` | `'label'` | `string \| number`

The key used to get the label from the item. | | `disabled` | | `boolean` | | `modal` | `true` | `boolean`

The modality of the dropdown menu.

When set to `true`, interaction with outside elements will be disabled and only menu content will be visible to screen readers. | | `ui` | | `{ content?: ClassNameValue; viewport?: ClassNameValue; group?: ClassNameValue; label?: ClassNameValue; separator?: ClassNameValue; ... 9 more ...; itemLabelExternalIcon?: ClassNameValue; }` | ### [Slots](https://ui.nuxt.com/components/context-menu#slots) | Slot | Type | | --- | --- | | `default` | `{}` | | `item` | `{ item: ContextMenuItem; active?: boolean \| undefined; index: number; }` | | `item-leading` | `{ item: ContextMenuItem; active?: boolean \| undefined; index: number; }` | | `item-label` | `{ item: ContextMenuItem; active?: boolean \| undefined; index: number; }` | | `item-trailing` | `{ item: ContextMenuItem; active?: boolean \| undefined; index: number; }` | | `content-top` | `{}` | | `content-bottom` | `{}` | ### [Emits](https://ui.nuxt.com/components/context-menu#emits) | Event | Type | | --- | --- | | `update:open` | `[payload: boolean]` | [Theme](https://ui.nuxt.com/components/context-menu#theme) ----------------------------------------------------------- app.config.ts `export default defineAppConfig({ ui: { contextMenu: { slots: { content: 'min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1', group: 'p-1 isolate', label: 'w-full flex items-center font-semibold text-highlighted', separator: '-mx-1 my-1 h-px bg-border', item: 'group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0', itemTrailingKbdsSize: '', itemLabel: 'truncate', itemLabelExternalIcon: 'inline-block size-3 align-top text-dimmed' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } }, size: { xs: { label: 'p-1 text-xs gap-1', item: 'p-1 text-xs gap-1', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, sm: { label: 'p-1.5 text-xs gap-1.5', item: 'p-1.5 text-xs gap-1.5', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, md: { label: 'p-1.5 text-sm gap-1.5', item: 'p-1.5 text-sm gap-1.5', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'md' }, lg: { label: 'p-2 text-sm gap-2', item: 'p-2 text-sm gap-2', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'md' }, xl: { label: 'p-2 text-base gap-2', item: 'p-2 text-base gap-2', itemLeadingIcon: 'size-6', itemLeadingAvatarSize: 'xs', itemTrailingIcon: 'size-6', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'lg' } } }, compoundVariants: [ { color: 'primary', active: false, class: { item: 'text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10', itemLeadingIcon: 'text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary' } }, { color: 'primary', active: true, class: { item: 'text-primary before:bg-primary/10', itemLeadingIcon: 'text-primary' } } ], 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: { contextMenu: { slots: { content: 'min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1', group: 'p-1 isolate', label: 'w-full flex items-center font-semibold text-highlighted', separator: '-mx-1 my-1 h-px bg-border', item: 'group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0', itemTrailingKbdsSize: '', itemLabel: 'truncate', itemLabelExternalIcon: 'inline-block size-3 align-top text-dimmed' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } }, size: { xs: { label: 'p-1 text-xs gap-1', item: 'p-1 text-xs gap-1', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, sm: { label: 'p-1.5 text-xs gap-1.5', item: 'p-1.5 text-xs gap-1.5', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, md: { label: 'p-1.5 text-sm gap-1.5', item: 'p-1.5 text-sm gap-1.5', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'md' }, lg: { label: 'p-2 text-sm gap-2', item: 'p-2 text-sm gap-2', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'md' }, xl: { label: 'p-2 text-base gap-2', item: 'p-2 text-base gap-2', itemLeadingIcon: 'size-6', itemLeadingAvatarSize: 'xs', itemTrailingIcon: 'size-6', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'lg' } } }, compoundVariants: [ { color: 'primary', active: false, class: { item: 'text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10', itemLeadingIcon: 'text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary' } }, { color: 'primary', active: true, class: { item: 'text-primary before:bg-primary/10', itemLeadingIcon: 'text-primary' } } ], 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: { contextMenu: { slots: { content: 'min-w-32 bg-default shadow-lg rounded-md ring ring-default overflow-hidden data-[state=open]:animate-[scale-in_100ms_ease-out] data-[state=closed]:animate-[scale-out_100ms_ease-in] origin-(--reka-context-menu-content-transform-origin) flex flex-col', viewport: 'relative divide-y divide-default scroll-py-1 overflow-y-auto flex-1', group: 'p-1 isolate', label: 'w-full flex items-center font-semibold text-highlighted', separator: '-mx-1 my-1 h-px bg-border', item: 'group relative w-full flex items-center select-none outline-none before:absolute before:z-[-1] before:inset-px before:rounded-md data-disabled:cursor-not-allowed data-disabled:opacity-75', itemLeadingIcon: 'shrink-0', itemLeadingAvatar: 'shrink-0', itemLeadingAvatarSize: '', itemTrailing: 'ms-auto inline-flex gap-1.5 items-center', itemTrailingIcon: 'shrink-0', itemTrailingKbds: 'hidden lg:inline-flex items-center shrink-0', itemTrailingKbdsSize: '', itemLabel: 'truncate', itemLabelExternalIcon: 'inline-block size-3 align-top text-dimmed' }, variants: { color: { primary: '', secondary: '', success: '', info: '', warning: '', error: '', neutral: '' }, active: { true: { item: 'text-highlighted before:bg-elevated', itemLeadingIcon: 'text-default' }, false: { item: [ 'text-default data-highlighted:text-highlighted data-[state=open]:text-highlighted data-highlighted:before:bg-elevated/50 data-[state=open]:before:bg-elevated/50', 'transition-colors before:transition-colors' ], itemLeadingIcon: [ 'text-dimmed group-data-highlighted:text-default group-data-[state=open]:text-default', 'transition-colors' ] } }, loading: { true: { itemLeadingIcon: 'animate-spin' } }, size: { xs: { label: 'p-1 text-xs gap-1', item: 'p-1 text-xs gap-1', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, sm: { label: 'p-1.5 text-xs gap-1.5', item: 'p-1.5 text-xs gap-1.5', itemLeadingIcon: 'size-4', itemLeadingAvatarSize: '3xs', itemTrailingIcon: 'size-4', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'sm' }, md: { label: 'p-1.5 text-sm gap-1.5', item: 'p-1.5 text-sm gap-1.5', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-0.5', itemTrailingKbdsSize: 'md' }, lg: { label: 'p-2 text-sm gap-2', item: 'p-2 text-sm gap-2', itemLeadingIcon: 'size-5', itemLeadingAvatarSize: '2xs', itemTrailingIcon: 'size-5', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'md' }, xl: { label: 'p-2 text-base gap-2', item: 'p-2 text-base gap-2', itemLeadingIcon: 'size-6', itemLeadingAvatarSize: 'xs', itemTrailingIcon: 'size-6', itemTrailingKbds: 'gap-1', itemTrailingKbdsSize: 'lg' } } }, compoundVariants: [ { color: 'primary', active: false, class: { item: 'text-primary data-highlighted:text-primary data-highlighted:before:bg-primary/10 data-[state=open]:before:bg-primary/10', itemLeadingIcon: 'text-primary/75 group-data-highlighted:text-primary group-data-[state=open]:text-primary' } }, { color: 'primary', active: true, class: { item: 'text-primary before:bg-primary/10', itemLeadingIcon: 'text-primary' } } ], defaultVariants: { size: 'md' } } } }) ] })` Expand code [](https://github.com/nuxt/ui/blob/v3/src/theme/context-menu.ts "Compound variants") Some colors in `compoundVariants` are omitted for readability. Check out the source code on GitHub. [Container\ \ A container lets you center and constrain the width of your content.](https://ui.nuxt.com/components/container) [Drawer\ \ A drawer that smoothly slides in & out of the screen.](https://ui.nuxt.com/components/drawer) ---