V Vaylan UI
Navigation

Tabs

Switch between related routes or views with explicit state.

Preview

Example

<.tabs id="settings"><:tab label="Profile" patch={~p"/settings/profile"} active /></.tabs>

API contract

tabs/1 uses declared Phoenix attributes and slots. This table is generated from the compiled component metadata.

AttributeTypeRequiredDefaultAccepted values
id :string Yes Any value matching the declared type
label :string No "Sections" Any value matching the declared type
variant :atom No :border [:box, :border, :lift]
size :atom No :md [:xs, :sm, :md, :lg, :xl]
class :any No nil Any value matching the declared type
SlotRequiredSlot attributes
tab Yes label: :string required, active: :boolean, disabled: :boolean, href: :string, navigate: :string, patch: :string

States and behavior

Active and disabled tabs expose selected and disabled state through ARIA and visible styling.

Keyboard and accessibility