enes

Dropdown Select Prototype

import { DropdownSelect } from 'fluentui-svelte';

The Dropdown Select is a dropdown built on the native select element. It lets users choose one option, or several with the multiple prop, from a list of DropdownSelectOption children.

Custom Option Content

Options can render rich content such as a Persona. Provide a text prop for the plain-text selection label.

Multiple Selection

Set the multiple prop to allow selecting more than one option at a time.

Component Props

NameTypeDefaultDescription
value bindablestring | string[]multiple ? [] : ''The selected value. An array of values when `multiple` is set.
multiplebooleanAllows more than one option to be selected at a time.
placeholderstring'Native Select Dropdown'The text shown while no option is selected.
hidePlaceholderbooleanKeeps the placeholder out of the option list once a value is selected.
ref bindableHTMLSelectElementThe DOM reference of the select element.
wrapperRef bindableHTMLDivElementThe DOM reference of the wrapper element.
wrapperPropsHTMLAttributesThe attributes to spread on the wrapper element.
Element Attributes (select)

DropdownSelectOption Props

NameTypeDefaultDescription
valuestringThe value reported to the select when the option is picked.
textstringThe label of the option. Falls back to the rendered children.
disabledbooleanDisables the user interaction.
ref bindableHTMLElementThe DOM reference of the option element.
childrenSnippetThe content of the option, used when no `text` is given.
Element Attributes (option)