Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Reference for Nuxt UI v4 (125+ components built on Reka UI + Tailwind CSS v4) including forms, overlays, and theming.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
components/select.md
1# Select23A select element to choose from a list of options.45> Based on [Reka UI Select](https://reka-ui.com/docs/components/select)67## Key Props89- `items`: as an array of strings, numbers or booleans:1011## ::component-code1213prettier: true14ignore:1516- modelValue17- items18- class19external:20- items21- modelValue22props:23modelValue: 'Backlog'24items: - Backlog - Todo - In Progress - Done25class: 'w-48'2627---2829::3031You can also pass an array of objects with the following properties:3233- `label?: string`{lang="ts-type"}34- [`value?: string`{lang="ts-type"}](#value-key)35- [`type?: "label" | "separator" | "item"`{lang="ts-type"}](#with-items-type)36- [`icon?: string`{lang="ts-type"}](#with-icons-in-items)37- [`avatar?: AvatarProps`{lang="ts-type"}](#with-avatar-in-items)38- [`chip?: ChipProps`{lang="ts-type"}](#with-chip-in-items)39- `disabled?: boolean`{lang="ts-type"}40- `class?: any`{lang="ts-type"}41- `ui?: { label?: ClassNameValue, separator?: ClassNameValue, item?: ClassNameValue, itemLeadingIcon?: ClassNameValue, itemLeadingAvatarSize?: ClassNameValue, itemLeadingAvatar?: ClassNameValue, itemLeadingChipSize?: ClassNameValue, itemLeadingChip?: ClassNameValue, itemLabel?: ClassNameValue, itemTrailing?: ClassNameValue, itemTrailingIcon?: ClassNameValue }`{lang="ts-type"}4243## ::component-code4445ignore:4647- modelValue48- items49- class50external:51- items52- modelValue53externalTypes:54- SelectItem[]55props:56modelValue: 'backlog'57items: - label: 'Backlog'58value: 'backlog' - label: 'Todo'59value: 'todo' - label: 'In Progress'60value: 'in_progress' - label: 'Done'61value: 'done'62class: 'w-48'6364---6566::6768::caution69When using objects, you need to reference the `value` property of the object in the `v-model` directive or the `default-value` prop.7071- `multiple`: to allow multiple selections, the selected items will be separated by a comma in the trigger.72- `placeholder`: to set a placeholder text.73- `content`: to control how the Select content is rendered, like its `align` or `side` for example.74- `arrow`: to display an arrow on the Select.75- `color`: to change the ring color when the Select is focused.76- `variant`: to change the variant of the Select.77- `size`: to change the size of the Select.78- `icon`: to show an [Icon](/docs/components/icon) inside the Select.79- `avatar`: to show an [Avatar](/docs/components/avatar) inside the Select.8081## Usage8283```vue84<USelect85<!-- props here -->86/>87```8889## Slots9091- `#leading`92