Select
A pill that opens a list on the menu surface: a check on the selected item, groups, typeahead.
<div className="w-280">
<Select label="Log retention" options={retention} defaultValue="30" fullWidth />
</div>import { Select } from "@logicplanes/kaeso-ui";Props
appearance"ghost" | "default" | "header"A filled field (
default), a quiet one for toolbars (ghost), or a quiet one in full text colour for column headers (header).aria-labelstringThe accessible name, for when there is no visible label.
defaultValuestring | string[] | nullThe value on first render, when the component keeps its own value.
descriptionReactNodeOne sentence of help under the label.
disabledbooleanTurns it off: it can't be used, and it looks dimmed.
fullWidthbooleanWidth of the trigger follows its content (default) or fills the container.
iconIconSvgElementLeading icon in the trigger.
idstringThe id of the control, so a label elsewhere can point to it.
invalidbooleanShows it as invalid; pair it with a message that says what to fix.
labelReactNodeThe visible label.
layout"horizontal" | "vertical"The label above the control (
vertical) or beside it (horizontal).multiplebooleanAllows choosing more than one option;
valueis then a list.namestringThe field name the value is sent under in a form.
onOpenChange((open: boolean) => void)Called when the list opens or closes.
onValueChange((value: string) => void) | ((value: string[]) => void)Called with the chosen value, or the list of values with
multiple.openbooleanWhether the list is open, when you control it.
optionalbooleanAdds “Optional” to the label, for forms where most fields are required.
optionsSelectOption[]The options to choose from.
placeholderReactNodeDefaults to "Select" in the provider's language.
requiredbooleanMarks it as required in a form.
size"md" | "sm" | "lg" | "xl"The height of the field.
valuestring | string[] | nullThe chosen value, or a list of values with
multiple, when you control it.