Dot Select
Its chevron is five dots that turn over as it opens, and the menu arrives through a dither dissolve, upward when there's no room below. Underneath it behaves like a native select: type letters to jump, press and drag to pick in one go, full keyboard and screen-reader support, and a name to submit with a form.
Needs: None. DOM, one small canvas and the popover top layer.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| options | { value: string; label: string; hint?: string; disabled?: boolean }[] | required | The choices. A hint sits on the right of its row. |
| value | string | null | – | The chosen value, when you hold it. |
| defaultValue | string | – | The value chosen at first, when the select holds it. |
| onChange | (value: string) => void | – | Called with the new value. |
| placeholder | string | "Choose…" | Shown until something is chosen. |
| name | string | – | Submits the value with a surrounding form under this name. |
| disabled | boolean | false | Greys it out and stops it opening. |
| label | string | – | Its name for screen readers, when no <label htmlFor> names it. |
| id | string | – | For a <label htmlFor>. |
| tone | string | "" | The highlight's and tick's colour. The accent when unset. |
| className | string | – | Class on the root. |
| style | CSSProperties | – | Style on the root. Theme it through the --mlui-* variables. |