import Select from '@precursor/select';Example
import Select from '@precursor/select';
export default function Example() {
return (
<Select name="color-mode" defaultValue="auto">
<option value="auto">System</option>
<option value="light">Light</option>
<option value="dark">Dark</option>
</Select>
);
}
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
childrenRequired | ReactNode | — | — |
className | string | — | — |
disabled | boolean | — | — |
id | string | — | — |
name | string | — | — |
onChange | ChangeEventHandler<HTMLSelectElement> | — | — |
value | string | — | — |
state | "success" | "error" | "warning" | — | — |
size | "s" | "m" | "l" | — | — |
defaultValue | string | — | — |