Dot Tabs
Under the tabs runs a strip of dots, lit beneath the open one. Switching sends the lit stretch across like an inchworm: its front reaches the new tab first and its back gathers up behind it, and hovering lights a faint preview. Full keyboard tabs: arrows, Home and End.
Needs: None. DOM and one small animation loop.
Customize
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| tabs | { label: string; content: ReactNode }[] | required | The tabs and what each shows. |
| initial | number | 0 | The tab open at first. |
| onChange | (index: number) => void | – | Called when the open tab changes. |
| tone | string | "" | The lit dots' colour. The text colour when unset. |
| pitch | number | 6 | Distance between dots in the strip, in px. |
| className | string | – | Class on the root. |
| style | CSSProperties | – | Style on the root. Theme it through the --mlui-* variables. |