Tab panels

Tab panels let users switch between views in the same context.

v0.36.1AlphaNot reviewed for accessibility

Description

Use TabPanels for tabs with panel navigation.

Arguments

NameTypeDefaultDescription
label
String

N/A

Sets an aria-label that helps assistive technology users understand the purpose of the tabs.

align
Symbol

N/A

One of :left or :right. - Defaults to left

body_arguments
Hash

{}

System arguments for the body wrapper.

wrapper_arguments
Hash

{}

System arguments for the TabContainer wrapper.

system_arguments
Hash

N/A

Examples

Slots

tabs

Tabs to be rendered. For more information, refer to Primer::Alpha::Navigation::Tab.

NameTypeDefaultDescription
id
String

N/A

Unique ID of tab.

selected
Boolean

N/A

Whether the tab is selected.

system_arguments
Hash

N/A

extra

Renders extra content to the TabPanels. This will be rendered after the tabs.

NameTypeDefaultDescription
align
Symbol

N/A

One of :left or :right.