Seed Bible extension API (v1.19.0) / seed-bible/components / SelectProps
Type Alias: SelectProps
type SelectProps = Omit<
JSX.SelectHTMLAttributes<HTMLSelectElement>,
"value" | "size" | "multiple" | "class" | "className" | "children"
> & {
children: ComponentChildren;
class?: string;
className?: string;
invalid?: boolean;
onValueChange?: (value: string) => void;
selectRef?: Ref<HTMLSelectElement>;
size?: TextInputSize;
value: string;
};Type Declaration
children
children: ComponentChildren;The <option>s (and <optgroup>s) to choose from.
class?
class?: string;className?
className?: string;Extra classes, for placement, on the element around the <select>. class and className both work.
invalid?
invalid?: boolean;Draws the box in the danger color and tells screen readers the choice is wrong.
onValueChange?
onValueChange?: (value: string) => void;Called with the chosen option's value.
Parameters
| Parameter | Type |
|---|---|
value | string |
Returns
void
selectRef?
selectRef?: Ref<HTMLSelectElement>;The <select> element, for code that has to focus it.
size?
size?: TextInputSize;md (the default) for forms; sm for a box inside a row or a toolbar.
value
value: string;