Tabs

Tabs and panels (WAI-ARIA tabs pattern): arrows, Home/End, automatic or manual activation.

Source on GitHub

Default · underline
Code Tests 12 Settings Billing
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
SaveReset
Billing.
Pills
Day Week Month
Compact · size xs
Params Headers Body Auth Tests Settings
Outline · vertical
General Editor Keybindings
Indent width
  • Command palette⌘ K
  • Run tests⌘ T
  • Toggle sidebar⌘ B
  • Format document⇧ ⌥ F
Code

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.

PropertyAttributeTypeDefaultDescription
valuevaluestringValue of the active tab (default: the first enabled one).
variantvariant reflectsdefault | outline | pillsdefaultTab style.
orientationorientation reflectshorizontal | verticalhorizontalTab list direction (and arrow keys).
colorcolor reflectsstringActive indicator color.
sizesize reflectsxs | sm | md | lg | xlsmHeight, font size and padding of the tabs (xs for a compact bar).
activationactivationauto | manualautomanual: arrows move focus, Enter/Space activates.
growgrow reflectsbooleanTabs share the full width.
EventDescription
changeThe user activated another tab.
SlotDescription
(default)ray-tab and ray-tab-panel elements (tabs move to the tab list on their own).
PartDescription
listThe tab list (it scrolls sideways when the tabs do not fit).
panelsThe panel area.

<ray-tab>

PropertyAttributeTypeDefaultDescription
valuevalue reflectsstringMatches a ray-tab-panel's value.
disableddisabled reflectsbooleanCannot be activated.
countcount reflectsstringA small number after the label ("3", "99+"), lighter than a badge; part of the tab's accessible name. Empty: none.
SlotDescription
leftIcon.
rightA badge or other content after the label (for a plain number, count is lighter).
PartDescription
countThe count.

<ray-tab-panel>

PropertyAttributeTypeDefaultDescription
valuevalue reflectsstringMatches a ray-tab's value.