--- github: true headlessui: label: 'Listbox' to: 'https://headlessui.com/vue/listbox' --- ## Usage ::component-example #default :select-menu-example-basic{class="max-w-[12rem] w-full"} #code ```vue ``` :: You can use multiple values but you have to override the `#label` slot and handle the display yourself. ::component-example #default :select-menu-example-multiple{class="max-w-[12rem] w-full"} #code ```vue ``` :: You can also override the default slot entirely. ::component-example #default :select-menu-example-button{class="max-w-[12rem] w-full"} #code ```vue ``` :: 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. ::component-example #default :select-menu-example-objects{class="max-w-[12rem] w-full"} #code ```vue ``` :: ### Icon Use any icon from [Iconify](https://icones.js.org) by setting the `icon` prop by using this pattern: `i-{collection_name}-{icon_name}`. ::component-card --- baseProps: class: 'max-w-[12rem] w-full' 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: icon: 'i-heroicons-magnifying-glass-20-solid' excludedProps: - icon --- :: ### Search Use the `searchable` prop to enable search. This will use HeadlessUI [Combobox](https://headlessui.com/vue/combobox) component instead of [Listbox](https://headlessui.com/vue/listbox). ::component-card --- baseProps: class: 'max-w-[12rem] w-full' 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 --- :: ### Disabled Use the `disabled` prop to disable the SelectMenu. ::component-card --- baseProps: class: 'max-w-[12rem] w-full' 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: disabled: true --- :: ## Props :component-props ## Preset :component-preset