Tabs
Tabs and panels (WAI-ARIA tabs pattern): arrows, Home/End, automatic or manual activation.
Default · underline
ray-remotemain · updated 2 hours ago
src/6 files src/main.ray4.2 KB src/server.ray11.8 KB ray.toml312 B
12 tests, all passing1.84 s
server › serves the index12 ms server › rejects a bad token8 ms sync › resumes after a drop1.2 s
Pills
Compact · size xs
Outline · vertical
Indent width
- Command palette
⌘ K - Run tests
⌘ T - Toggle sidebar
⌘ B - Format document
⇧ ⌥ F
API
For AI agents: this API as Markdown, or every component in llms-full.txt.
<ray-tabs>
More tabs than width: the list scrolls sideways, fades the edge that hides tabs, scrolls with a vertical wheel and keeps the selected tab in view. The host then carries data-overflow-start and data-overflow-end (following the writing direction), to style it further.
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value | string | Value of the active tab (default: the first enabled one). | |
variant | variant reflects | default | outline | pills | default | Tab style. |
orientation | orientation reflects | horizontal | vertical | horizontal | Tab list direction (and arrow keys). |
color | color reflects | string | Active indicator color. | |
size | size reflects | xs | sm | md | lg | xl | sm | Height, font size and padding of the tabs (xs for a compact bar). |
activation | activation | auto | manual | auto | manual: arrows move focus, Enter/Space activates. |
grow | grow reflects | boolean | Tabs share the full width. |
| Event | Description |
|---|---|
change | The user activated another tab. |
| Slot | Description |
|---|---|
| (default) | ray-tab and ray-tab-panel elements (tabs move to the tab list on their own). |
| Part | Description |
|---|---|
list | The tab list (it scrolls sideways when the tabs do not fit). |
panels | The panel area. |
<ray-tab>
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value reflects | string | Matches a ray-tab-panel's value. | |
disabled | disabled reflects | boolean | Cannot be activated. | |
count | count reflects | string | A small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none. |
| Slot | Description |
|---|---|
left | Icon. |
right | A badge or other content after the label (for a plain number, count is lighter). |
| Part | Description |
|---|---|
count | The count. |
<ray-tab-panel>
| Property | Attribute | Type | Default | Description |
|---|---|---|---|---|
value | value reflects | string | Matches a ray-tab's value. |