Tabs

A set of layered sections of content—known as tab panels—that are displayed one at a time.

Anatomy

Tabs do |t|
t.list do
t.trigger
t.trigger
end
t.content
t.content
end

API Reference

Tabs

NameTypeDefault
value:stringnil
The value of the tab that should be active by default. Must match the value of a trigger and content pair.
dir:string"ltr"
Text direction for the tabs component. Affects keyboard navigation behavior (left/right arrow keys).
attributeskeyword arguments

Tabs#list

NameType
attributeskeyword arguments

Tabs#trigger

NameTypeDefault
value:stringnil
Unique identifier for this tab trigger. Must be provided and should match the corresponding content panel's value.
attributeskeyword arguments

Tabs#content

NameTypeDefault
value:stringnil
Unique identifier that links this content to its trigger. Must match the corresponding trigger's value.
attributeskeyword arguments

Examples