Select components act as <select> elements that use a custom dropdown menu UI. Currently, only single-select is supported. We're working on it.
<Select
options={[
{ label: "Option 1", value: "opt1" },
{ label: "Option 2", value: "opt2" },
{ label: "Option 3", value: "opt3" },
]}
value={selectedValue}
onChange={handleChange}
name={fontClass}
>
<SelectTrigger>
<Button label="Select"></Button>
</SelectTrigger>
<SelectMenu
cardProps={{ scaleFactor: fontClass, material: "glass", materialProps: { thickness: "normal" } }}
>
<SelectOption value="opt1">Option 1</SelectOption>
<SelectOption value="opt2">Option 2</SelectOption>
<SelectOption value="opt3">Option 3</SelectOption>
</SelectMenu>
</Select>
Note: Other React frameworks are not currently supported, but they might still work. Try at your own risk.
Props unique to this component.
Props with globally-defined behavior that are used in multiple components.