-
-```
-
-Then, you can use the `useModal` composable to control your modals within your app.
-
-:component-example{component="modal-example-composable"}
-
-Additionally, you can close the modal within the modal component by calling `modal.close()`.
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
+:component-theme
diff --git a/docs/content/2.components/navigation-menu.md b/docs/content/2.components/navigation-menu.md
index cd481d2d..4f4119c5 100644
--- a/docs/content/2.components/navigation-menu.md
+++ b/docs/content/2.components/navigation-menu.md
@@ -1,62 +1,19 @@
---
-title: HorizontalNavigation
+title: NavigationMenu
description: Display a list of horizontal links.
links:
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/navigation-menu.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/navigation/HorizontalNavigation.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/HorizontalNavigation.vue
---
## Usage
-Pass an array to the `links` prop of the HorizontalNavigation component. Each link can have the following properties:
+## Examples
-- `label` - The label of the link.
-- `labelClass` - The class of the link label.
-- `icon` - The icon of the link.
-- `iconClass` - The class of the link icon.
-- `avatar` - The avatar of the link. You can pass all the props of the [Avatar](/components/avatar) component.
-- `badge` - A badge to display next to the label. You can pass all the props of the [Badge](/components/badge) component.
-- `click` - The click handler of the link.
+:component-api
-You can also pass any property from the [NuxtLink](https://nuxt.com/docs/api/components/nuxt-link#props) component such as `to`, `exact`, etc.
-
-:component-example{component="horizontal-navigation-example"}
-
-## Sections
-
-Group your navigation links into distinct sections, they will be displayed apart thanks to a `justify-between` flexbox layout.
-
-You can do this by passing an array of arrays to the `links` prop of the HorizontalNavigation component.
-
-:component-example{component="horizontal-navigation-example-sections"}
-
-## Slots
-
-You can use slots to customize links display.
-
-### `default`
-
-Use the `#default` slot to customize the link label. You will have access to the `link` and `isActive` properties in the slot scope.
-
-:component-example{component="horizontal-navigation-example-default-slot"}
-
-### `avatar`
-
-Use the `#avatar` slot to customize the link avatar. You will have access to the `link` and `isActive` properties in the slot scope.
-
-### `icon`
-
-Use the `#icon` slot to customize the link icon. You will have access to the `link` and `isActive` properties in the slot scope.
-
-### `badge`
-
-Use the `#badge` slot to customize the link badge. You will have access to the `link` and `isActive` properties in the slot scope.
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
+:component-theme
diff --git a/docs/content/2.components/notification.md b/docs/content/2.components/notification.md
deleted file mode 100644
index 6ff881ac..00000000
--- a/docs/content/2.components/notification.md
+++ /dev/null
@@ -1,302 +0,0 @@
----
-description: Display a toast notification in your app.
-links:
- - label: GitHub
- icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/overlays/Notification.vue
----
-
-## Usage
-
-First of all, add the `Notifications` component to your app, preferably inside `app.vue`.
-
-```vue [app.vue]
-
-
-
-
-
-
-
-
-
-```
-
-This component will render the notifications at the bottom right of the screen by default. You can configure its behavior in the `app.config.ts` through `ui.notifications`:
-
-```ts [app.config.ts]
-export default defineAppConfig({
- ui: {
- notifications: {
- // Show toasts at the top right of the screen
- position: 'top-0 bottom-auto'
- }
- }
-})
-```
-
-Then, you can use the `useToast` composable to add notifications to your app:
-
-:component-example{component="notification-example-basic"}
-
-When using `toast.add`, this will push a new notification to the stack displayed in ``. All the props of the `Notification` component can be passed to `toast.add`.
-
-```vue
-
-```
-
-You can also use the `Notification` component directly in your app as an alert for example.
-
-### Title
-
-Pass a `title` to your Notification.
-
-::component-card
----
-baseProps:
- id: 1
- timeout: 0
-props:
- title: 'Notification'
----
-::
-
-### Description
-
-You can add a `description` in addition of the `title`.
-
-::component-card
----
-baseProps:
- id: 2
- timeout: 0
- title: 'Notification'
-props:
- description: 'This is a notification.'
----
-::
-
-### Icon
-
-Use any icon from [Iconify](https://icones.js.org) by setting the `icon` prop by using this pattern: `i-{collection_name}-{icon_name}` or change it globally in `ui.notification.default.icon`.
-
-::component-card
----
-baseProps:
- id: 3
- timeout: 0
- title: 'Notification'
-props:
- icon: 'i-heroicons-check-circle'
- description: 'This is a notification.'
-excludedProps:
- - icon
----
-::
-
-### Avatar
-
-Use the [avatar](/components/avatar) prop as an `object` and configure it with any of its props.
-
-::component-card
----
-baseProps:
- id: 4
- timeout: 0
- title: 'Notification'
-props:
- description: 'This is a notification.'
- avatar:
- src: 'https://avatars.githubusercontent.com/u/739984?v=4'
-excludedProps:
- - avatar
----
-::
-
-### Timeout
-
-Use the `timeout` prop to configure how long the Notification will remain. The default value is `5000`, set it to `0` to disable the timeout.
-
-You will see a progress bar at the bottom of the Notification which will indicate the remaining time. When hovering the Notification, the progress bar will be paused.
-
-::component-card
----
-baseProps:
- id: 5
- title: 'Notification'
- description: 'This is a notification.'
-props:
- timeout: 60000
----
-::
-
-### Style
-
-Use the `color` prop to change the progress and icon color of the Notification.
-
-::component-card
----
-baseProps:
- id: 6
- title: 'Notification'
- description: 'This is a notification.'
- timeout: 600000
-props:
- icon: 'i-heroicons-check-badge'
- color: 'primary'
-options:
- - name: color
- restriction: included
- values:
- - gray
-excludedProps:
- - icon
----
-::
-
-### Click
-
-Use the `click` prop to execute a function when the Notification is clicked.
-
-:component-example{component="notification-example-click"}
-
-### Callback
-
-Use the `callback` prop to execute a function when the Notification expires.
-
-:component-example{component="notification-example-callback"}
-
-### Close
-
-Use the `close-button` prop to hide or customize the close button on the Notification.
-
-You can pass all the props of the [Button](/components/button) component to customize it through the `close-button` prop or globally through `ui.notification.default.closeButton`.
-
-::component-card
----
-baseProps:
- id: 7
- title: 'Notification'
- timeout: 0
-props:
- closeButton:
- icon: 'i-heroicons-archive-box-x-mark'
- color: 'primary'
- variant: 'outline'
- padded: true
- size: '2xs'
- ui:
- rounded: 'rounded-full'
-excludedProps:
- - closeButton
----
-::
-
-### Actions
-
-Use the `actions` prop to add actions to the Notification.
-
-:component-example{component="notification-example-actions"}
-
-Like for `closeButton`, you can pass all the props of the [Button](/components/button) component inside the action or globally through `ui.notification.default.actionButton`.
-
-::component-card
----
-baseProps:
- id: 8
- title: 'Notification'
- timeout: 0
-props:
- actions:
- - label: Action 1
- - variant: 'solid'
- color: 'gray'
- label: Action 2
-excludedProps:
- - actions
----
-::
-
-Actions will render differently whether you have a `description` set.
-
-::component-card
----
-baseProps:
- id: 9
- title: 'Notification'
- description: 'This is a notification.'
- timeout: 0
-props:
- actions:
- - variant: 'solid'
- color: 'primary'
- label: Action 1
- - variant: 'outline'
- color: 'primary'
- label: Action 2
-excludedProps:
- - actions
----
-::
-
-## Slots
-
-### `title` / `description`
-
-Use the `#title` and `#description` slots to customize the Notification.
-
-This can be handy when you want to display HTML content. To achieve this, you can define those slots in the top-level `` component in your `app.vue` and use the `v-html` directive.
-
-```vue [app.vue]
-
-
-
-
-
-
-
-
-
-
-
-```
-
-This way, you can use HTML tags in the `title` and `description` props when using `useToast`.
-
-:component-example{component="notification-example-html"}
-
-::callout{icon="i-heroicons-light-bulb"}
-Slots defined in the `` component are automatically passed down to the `Notification` children.
-::
-
-## Props
-
-::tabs
- :component-props{label="Notification"}
- :component-props{label="Notifications" slug="UNotifications"}
-::
-
-## Config
-
-::tabs
- :component-preset{label="Notification"}
- :component-preset{label="Notifications" slug="Notifications"}
-::
diff --git a/docs/content/2.components/pagination.md b/docs/content/2.components/pagination.md
index f2890e8a..91799382 100644
--- a/docs/content/2.components/pagination.md
+++ b/docs/content/2.components/pagination.md
@@ -1,157 +1,18 @@
---
description: Add a pagination to handle pages.
links:
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/pagination.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/navigation/Pagination.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/Pagination.vue
---
## Usage
-Use a `v-model` to get a reactive page alongside a `total` which represents the total of items. You can also use the `page-count` prop to define the number of items per page which defaults to `10`.
+## Examples
-:component-example{component="pagination-example-basic"}
+:component-api
-### Max
-
-Use the `max` prop to set a maximum of displayed pages. Defaults to `7`, being the minimum.
-
-::component-card
----
-baseProps:
- modelValue: 1
-props:
- max: 5
- pageCount: 5
- total: 100
-excludedProps:
- - pageCount
- - total
----
-::
-
-### Size
-
-Use the `size` prop to change the size of the buttons.
-
-::component-card
----
-baseProps:
- modelValue: 1
- total: 100
- showLast: true
- showFirst: true
-props:
- size: 'sm'
----
-::
-
-### Disabled
-
-Use the `disabled` prop to disable all the buttons.
-
-::component-card
----
-baseProps:
- modelValue: 1
- total: 100
- showLast: true
- showFirst: true
-props:
- disabled: true
----
-::
-
-### Active / Inactive
-
-Use the `active-button` and `inactive-button` props to customize the active and inactive buttons of the Pagination.
-
-::component-card
----
-baseProps:
- modelValue: 1
- total: 100
-props:
- activeButton:
- variant: 'outline'
- inactiveButton:
- color: 'gray'
-excludedProps:
- - activeButton
- - inactiveButton
----
-::
-
-### Prev / Next
-
-Use the `prev-button` and `next-button` props to customize the prev and next buttons of the Pagination.
-
-::component-card
----
-baseProps:
- modelValue: 1
- total: 100
-props:
- prevButton:
- icon: 'i-heroicons-arrow-small-left-20-solid'
- label: Prev
- color: 'gray'
- nextButton:
- icon: 'i-heroicons-arrow-small-right-20-solid'
- trailing: true
- label: Next
- color: 'gray'
-excludedProps:
- - prevButton
- - nextButton
----
-::
-
-### First / Last
-
-Use the `first-button` and `last-button` props to customize the first and last buttons of the Pagination.
-
-::component-card
----
-baseProps:
- modelValue: 1
- total: 100
- showFirst: true
- showLast: true
-props:
- firstButton:
- icon: 'i-heroicons-arrow-small-left-20-solid'
- label: First
- color: 'gray'
- lastButton:
- icon: 'i-heroicons-arrow-small-right-20-solid'
- trailing: true
- label: Last
- color: 'gray'
-excludedProps:
- - firstButton
- - lastButton
----
-::
-
-## Slots
-
-### `prev` / `next`
-
-Use the `#prev` and `#next` slots to set the content of the previous and next buttons.
-
-:component-example{component="pagination-example-prev-next-slots"}
-
-### `first` / `last`
-
-Use the `#first` and `#last` slots to set the content of the first and last buttons.
-
-:component-example{component="pagination-example-first-last-slots"}
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
+:component-theme
diff --git a/docs/content/2.components/popover.md b/docs/content/2.components/popover.md
index 756c6b6c..97bea48a 100644
--- a/docs/content/2.components/popover.md
+++ b/docs/content/2.components/popover.md
@@ -1,62 +1,18 @@
---
description: Display a non-modal dialog that floats around a trigger element.
links:
- - label: 'Popover'
- icon: i-simple-icons-headlessui
- to: 'https://headlessui.com/vue/popover'
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/popover.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/overlays/Popover.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/Popover.vue
---
## Usage
-:component-example{component="popover-example"}
+## Examples
-### Mode
+:component-api
-Use the `mode` prop to switch between `click` and `hover` modes.
-
-:component-example{component="popover-example-mode"}
-
-### Manual
-
-Use a `v-model:open` to manually control the state. In this example, press :shortcut{value="O"} to toggle the popover.
-
-:component-example{component="popover-example-open"}
-
-### Overlay
-
-:component-example{component="popover-example-overlay"}
-
-## Popper
-
-Use the `popper` prop to customize the popper instance.
-
-### Arrow
-
-:component-example{component="popover-example-arrow"}
-
-### Placement
-
-:component-example{component="popover-example-placement"}
-
-### Offset
-
-:component-example{component="popover-example-offset"}
-
-## Slots
-
-### `panel`
-
-Use the `#panel` slot to fill the content of the panel. You will have access to the `open` property and the `close` method in the slot scope.
-
-:component-example{component="popover-example-slot"}
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
+:component-theme
diff --git a/docs/content/2.components/progress.md b/docs/content/2.components/progress.md
index a33ba7cb..5c0a9ae3 100644
--- a/docs/content/2.components/progress.md
+++ b/docs/content/2.components/progress.md
@@ -2,150 +2,18 @@
title: 'Progress'
description: Show a horizontal bar to indicate task progression.
links:
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/progress.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/elements/Progress.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/Progress.vue
---
## Usage
-Pass an integer as the `value` from `0` to `100` to the Progress bar component.
+## Examples
-::component-card
----
-props:
- value: 70
----
-::
+:component-api
-::callout{icon="i-heroicons-light-bulb"}
-Check out the [Range](/components/range) component for forms.
-::
-
-### Max
-
-You may also set the `max` number to set the maximum progress value, which will be relative to 100% percent.
-
-::component-card
----
-props:
- value: 2
- max: 5
-options:
- - name: max
- restriction: only
- values:
- - 3
- - 4
- - 5
- - 6
- - 7
----
-::
-
-### Steps
-
-You can set an array of named steps in the `max` prop to show the active step, at the same time it sets the maximum value.
-
-The first step is always shown at `0%`, making the last `100%`.
-
-::component-card
----
-props:
- value: 0
- max:
- - Waiting to start
- - Cloning...
- - Migrating...
- - Deployed!
-excludedProps:
- - max
----
-::
-
-### Progress indicator
-
-You can add a numeric indicator, which will show the percent on top the progress track.
-
-::component-card
----
-props:
- value: 20
- indicator: true
----
-::
-
-### Indeterminate
-
-By not setting a `value`, or setting it as `null`, the progress bar becomes _indeterminate_. The bar will be animated as a carousel, but you can change it using the `animation` prop for an inverse carousel, a swinging bar or an elastic bar.
-
-::component-card
----
-baseProps:
- value: null
-props:
- animation: 'carousel'
-options:
- - name: animation
- restriction: only
- values:
- - 'carousel'
- - 'carousel-inverse'
- - 'swing'
- - 'elastic'
----
-::
-
-### Size
-
-Use the `size` prop to change the size of the progress bar.
-
-::component-card
----
-baseProps:
- value: 70
-props:
- size: 'md'
- indicator: false
-excludedProps:
- - value
----
-::
-
-### Style
-
-Use the `color` prop to change the visual style of the Progress bar. The `color` can be any color from the `ui.colors` object.
-
-::component-card
----
-baseProps:
- value: 70
-props:
- color: 'primary'
- indicator: false
-excludedProps:
- - modelValue
----
-::
-
-## Slots
-
-### `indicator`
-
-You can use the `#indicator` slot to show a custom indicator above the progress bar. It receives the current `percent` of progress.
-
-:component-example{component="progress-example-slot-indicator"}
-
-### `step-`
-
-Use the `#step-` to alter the HTML being shown for each step.
-
-:component-example{component="progress-example-slot-step"}
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
+:component-theme
diff --git a/docs/content/2.components/radio-group.md b/docs/content/2.components/radio-group.md
index be5790f5..59ec173b 100644
--- a/docs/content/2.components/radio-group.md
+++ b/docs/content/2.components/radio-group.md
@@ -2,171 +2,18 @@
title: RadioGroup
description: Display a set of radio buttons.
links:
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/radio-group.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/RadioGroup.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/RadioGroup.vue
---
## Usage
-Use a `v-model` to make the RadioGroup reactive.
+## Examples
-:component-example{component="radio-group-example"}
+:component-api
-Alternatively, you can use individual Radio components:
-
-:component-example{component="radio-example"}
-
-::callout{icon="i-heroicons-light-bulb"}
-If using the RadioGroup component, you can customize the Radio options by using the `uiRadio` prop.
-::
-
-### Legend
-
-Use the `legend` prop to add a legend to the RadioGroup.
-
-::component-card
----
-baseProps:
- options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification' }]
- modelValue: 'sms'
-props:
- legend: 'Legend'
----
-::
-
-### Style
-
-Use the `color` prop to change the style of the RadioGroup.
-
-::component-card
----
-baseProps:
- options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification' }]
- modelValue: 'sms'
-props:
- color: 'primary'
----
-::
-
-::callout{icon="i-heroicons-light-bulb"}
-This prop also work on the Radio component.
-::
-
-### Orientation
-
-You can change the orientation of the divider by setting the `orientation` prop to `horizontal` or `vertical`. Defaults to `vertical`.
-
-::component-card
----
-baseProps:
- options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification' }]
- modelValue: 'sms'
-props:
- orientation: 'horizontal'
----
-::
-
-### Disabled
-
-Use the `disabled` prop to disable the RadioGroup.
-
-::component-card
----
-baseProps:
- options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification', disabled: true }]
- modelValue: 'sms'
-props:
- disabled: true
----
-::
-
-::callout{icon="i-heroicons-light-bulb"}
-This prop also work on the Radio component and you can set the `disabled` field in the `options` to disable a specific Radio.
-::
-
-### Label
-
-Use the `label` prop to display a label on the right of the Radio.
-
-::component-card{slug="URadio"}
----
-props:
- label: 'Label'
----
-::
-
-### Required
-
-Use the `required` prop to display a red star next to the label of the Radio.
-
-::component-card{slug="URadio"}
----
-props:
- label: 'Label'
- required: true
----
-::
-
-### Help
-
-Use the `help` prop to display some text under the Radio.
-
-::component-card{slug="URadio"}
----
-props:
- label: 'Label'
- help: 'Please choose one'
----
-::
-
-## Slots
-
-### `label`
-
-Use the `#label` slot to override the label of each option.
-
-:component-example{component="radio-group-label-example"}
-
-Alternatively, you can do the same with individual Radio:
-
-::component-card{slug="URadio"}
----
-slots:
- label: Label
----
-
-#label
- [Label]{.italic}
-::
-
-### `legend`
-
-Use the `#legend` slot to override the content of the legend.
-
-::component-card
----
-baseProps:
- options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification' }]
- modelValue: 'sms'
-slots:
- legend: Legend
----
-
-#legend
- [Legend]{.italic}
-::
-
-## Props
-
-::tabs
- :component-props{label="Radio" slug="URadio"}
- :component-props{label="RadioGroup"}
-::
-
-## Config
-
-::tabs
- :component-preset{label="Radio" slug="Radio"}
- :component-preset{label="RadioGroup"}
-::
+:component-theme
diff --git a/docs/content/2.components/range.md b/docs/content/2.components/range.md
deleted file mode 100644
index c7b59ae3..00000000
--- a/docs/content/2.components/range.md
+++ /dev/null
@@ -1,79 +0,0 @@
----
-description: Display a range field
-links:
- - label: GitHub
- icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Range.vue
----
-
-## Usage
-
-Use a `v-model` to make the Range reactive.
-
-:component-example{component="range-example"}
-
-### Style
-
-Use the `color` prop to change the visual style of the Range.
-
-::component-card
----
-baseProps:
- placeholder: 'Search...'
-props:
- color: 'primary'
----
-::
-
-### Size
-
-Use the `size` prop to change the size of the Range.
-
-::component-card
----
-props:
- size: 'md'
----
-::
-
-### Disabled
-
-Use the `disabled` prop to disable the Range.
-
-::component-card
----
-props:
- disabled: true
----
-::
-
-### Min and Max
-
-Use the `min` and `max` prop to configure the Range.
-
-::component-card
----
-props:
- min: 0
- max: 100
----
-::
-
-### Step
-
-Use the `step` prop to change the step increment.
-
-::component-card
----
-props:
- step: 20
----
-::
-
-## Props
-
-:component-props
-
-## Config
-
-:component-preset
diff --git a/docs/content/2.components/select-menu.md b/docs/content/2.components/select-menu.md
index 43f90c09..87c73d2f 100644
--- a/docs/content/2.components/select-menu.md
+++ b/docs/content/2.components/select-menu.md
@@ -2,287 +2,18 @@
title: SelectMenu
description: Display a select menu with advanced features.
links:
- - label: 'Listbox'
- icon: i-simple-icons-headlessui
- to: 'https://headlessui.com/vue/listbox'
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/combobox.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/SelectMenu.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/SelectMenu.vue
---
## Usage
-The `SelectMenu` component renders by default a [Select](/components/select) component and is based on the `ui.select` preset. You can use most of the `Select` props to configure the display if you don't want to override the default slot such as [color](/components/select#style), [variant](/components/select#style), [size](/components/select#size), [placeholder](/components/select#placeholder), [icon](/components/select#icon), [disabled](/components/select#disabled), etc.
+## Examples
-You can use the `ui` prop like the `Select` component to override the default config. The `uiMenu` prop can be used to override the default menu config.
+:component-api
-Like the `Select` component, you can use the `options` prop to pass an array of strings or objects.
-
-::component-example
----
-component: 'select-menu-example-basic'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### Multiple
-
-You can use the `multiple` prop to select multiple values.
-
-::component-example
----
-component: 'select-menu-example-multiple'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### Objects
-
-You can pass an array of objects to `options` and either compare on the whole object or use the `by` prop to compare on a specific key. You can configure which field will be used to display the label through the `option-attribute` prop that defaults to `label`.
-
-::component-example
----
-component: 'select-menu-example-objects'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-If you only want to select a single object property rather than the whole object as value, you can set the `value-attribute` property. This prop defaults to `null`.The value of the `value-attribute` field in options must be unique.
-
-::component-example
----
-component: 'select-menu-example-objects-value-attribute'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### Icon
-
-Use the `selected-icon` prop to set a different icon or change it globally in `ui.selectMenu.default.selectedIcon`. Defaults to `i-heroicons-check-20-solid`.
-
-::component-card
----
-baseProps:
- class: 'w-full lg:w-48'
- placeholder: 'Select a person'
- options: ['Wade Cooper', 'Arlene Mccoy', 'Devon Webb', 'Tom Cook', 'Tanya Fox', 'Hellen Schmidt', 'Caroline Schultz', 'Mason Heaney', 'Claudie Smitham', 'Emil Schaefer']
-props:
- selectedIcon: 'i-heroicons-hand-thumb-up-solid'
-excludedProps:
- - selectedIcon
----
-::
-
-::callout{icon="i-heroicons-light-bulb"}
-Learn how to customize icons from the [Select](/components/select#icon) component.
-::
-
-## Searchable
-
-Use the `searchable` prop to enable search.
-
-Use the `searchable-placeholder` prop to set a different placeholder.
-
-This will use Headless UI [Combobox](https://headlessui.com/vue/combobox) component instead of [Listbox](https://headlessui.com/vue/listbox).
-
-::component-card
----
-baseProps:
- class: 'w-full lg:w-48'
- placeholder: 'Select a person'
- options: ['Wade Cooper', 'Arlene Mccoy', 'Devon Webb', 'Tom Cook', 'Tanya Fox', 'Hellen Schmidt', 'Caroline Schultz', 'Mason Heaney', 'Claudie Smitham', 'Emil Schaefer']
-props:
- searchable: true
- searchablePlaceholder: 'Search a person...'
----
-::
-
-### Attributes
-
-Use the `search-attributes` prop with an array of property names to search on each option object. Nested attributes can be accessed using `dot.notation`. When the property value is an array or object, these are cast to string so these can be searched within.
-
-::component-example
----
-component: 'select-menu-example-search-attributes'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### Clear on close
-
-By default, the search query will be kept after the menu is closed. To clear it on close, set the `clear-search-on-close` prop.
-
-You can also configure this globally through the `ui.selectMenu.default.clearSearchOnClose` config. Defaults to `false`.
-
-::component-card
----
-baseProps:
- class: 'w-full lg:w-48'
- placeholder: 'Select a person'
- searchable: true
- searchablePlaceholder: 'Search a person...'
- options: ['Wade Cooper', 'Arlene Mccoy', 'Devon Webb', 'Tom Cook', 'Tanya Fox', 'Hellen Schmidt', 'Caroline Schultz', 'Mason Heaney', 'Claudie Smitham', 'Emil Schaefer']
-props:
- clearSearchOnClose: true
----
-::
-
-### Control the query
-
-Use a `v-model:query` to control the search query.
-
-::component-example
----
-component: 'select-menu-example-search-query'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### Async search
-
-Pass a function to the `searchable` prop to customize the search behavior and filter options according to your needs. The function will receive the query as its first argument and should return an array.
-
-Use the `debounce` prop to adjust the delay of the function.
-
-::component-example
----
-component: 'select-menu-example-search-async'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-## Creatable
-
-Use the `creatable` prop to enable the creation of new options when the search doesn't return any results (only works with `searchable`).
-
-Try to search for something that doesn't exist in the example below.
-
-::component-example
----
-component: 'select-menu-example-creatable'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-However, if you want to create options despite search query (apart from exact match), you can set the `show-create-option-when` prop to `'always'`.
-
-You can also configure this globally through the `ui.selectMenu.default.showCreateOptionWhen` config. Defaults to `empty`.
-
-Try to search for something that exists in the example below, but not an exact match.
-
-::component-example
----
-component: 'select-menu-example-creatable-always'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-## Popper
-
-Use the `popper` prop to customize the popper instance.
-
-### Arrow
-
-:component-example{component="select-menu-example-arrow"}
-
-### Placement
-
-:component-example{component="select-menu-example-placement"}
-
-### Offset
-
-:component-example{component="select-menu-example-offset"}
-
-## Slots
-
-### `label`
-
-You can override the `#label` slot and handle the display yourself.
-
-::component-example
----
-component: 'select-menu-example-multiple-slot'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### `default`
-
-You can also override the `#default` slot entirely.
-
-::component-example
----
-component: 'select-menu-example-button'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### `option`
-
-Use the `#option` slot to customize the option content. You will have access to the `option`, `active` and `selected` properties in the slot scope.
-
-::component-example
----
-component: 'select-menu-example-option-slot'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### `option-empty`
-
-Use the `#option-empty` slot to customize the content displayed when the `searchable` prop is `true` and there is no options. You will have access to the `query` property in the slot scope.
-
-::component-example
----
-component: 'select-menu-example-option-empty-slot'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-### `option-create`
-
-Use the `#option-create` slot to customize the content displayed when the `creatable` prop is `true` and there is no options. You will have access to the `query` property in the slot scope.
-
-::callout{icon="i-heroicons-light-bulb"}
-An example is available in the [Creatable](#creatable) section.
-::
-
-### `empty`
-
-Use the `#empty` slot to customize the content displayed when there is no options. Defaults to `No options.`.
-
-::component-example
----
-component: 'select-menu-example-empty-slot'
-componentProps:
- class: 'w-full lg:w-48'
----
-::
-
-## Props
-
-:component-props
-
-## Config
-
-::callout{icon="i-heroicons-light-bulb"}
-Use the `ui` prop to override the select config and the `uiMenu` prop to override the menu config.
-::
-
-::tabs{:selectedIndex="1"}
- :component-preset{label="Select (ui)" slug="Select"}
- :component-preset{label="SelectMenu (uiMenu)"}
-::
+:component-theme
diff --git a/docs/content/2.components/select.md b/docs/content/2.components/select.md
index e64bbf0e..b3d603be 100644
--- a/docs/content/2.components/select.md
+++ b/docs/content/2.components/select.md
@@ -1,241 +1,18 @@
---
description: Display a select field.
links:
+ - label: Radix Vue
+ icon: i-custom-radix-vue
+ to: https://www.radix-vue.com/components/select.html
- label: GitHub
icon: i-simple-icons-github
- to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/forms/Select.vue
+ to: https://github.com/nuxt/ui/blob/dev/src/runtime/components/Select.vue
---
## Usage
-The Select component is a wrapper around the native `