Skip to Content

Tabs

A navigation component that switches structural content views without reloading by clicking button panes. 
For more information on this component configuration, visit Radix UI 

Tab one content

Vertical Orientation

Set the orientation prop to vertical to change the orientation of the component.

Tab one content

Disabled Item

Use the disabled attr or the disabled class to disable an item component.

Sizes

Use the tabs-{size} class to control the component size.

Size values can include:smmd.

For more information on all available sizing utilities, visit Tailwind 

Tab one content
Tab one content

Variants

Use the variant and palette classes to control the appereance of the component.

Variant values can include solidoutlinesurfacesubtleghostplain.
Color palettes can include primaryneutral. For extra palettes such as warning error and more, refer to the Colors section.

Customizing

globals.css
:root { --ex-tabs-trigger-cursor: default; --ex-tabs-px-sm: calc(var(--spacing) * 2); --ex-tabs-px-md: calc(var(--spacing) * 3); --ex-tabs-py-sm: calc(var(--spacing) * 2); --ex-tabs-py-md: calc(var(--spacing) * 3); --ex-tabs-radius-sm: var(--radius-sm); --ex-tabs-radius-md: var(--radius-sm); --ex-tabs-trigger-font-family: var(--font-sans); --ex-tabs-trigger-font-weight: var(--font-weight-normal); --ex-tabs-trigger-font-size-sm: var(--text-xs); --ex-tabs-trigger-font-size-md: var(--text-sm); --ex-tabs-trigger-height-sm: calc(var(--spacing) * 9); --ex-tabs-trigger-height-md: calc(var(--spacing) * 10); --ex-tabs-trigger-gap-sm: calc(var(--spacing) * 1.75); --ex-tabs-trigger-gap-md: calc(var(--spacing) * 2); --ex-tabs-trigger-px-sm: calc(var(--spacing) * 3.5); --ex-tabs-trigger-px-md: calc(var(--spacing) * 4); --ex-tabs-trigger-radius-sm: var(--radius-sm); --ex-tabs-trigger-radius-md: var(--radius-sm); }

API

For more information on this component configuration, visit Radix UI 

Tabs

PropTypeDefault
asElementTypediv
asChildbooleanfalse
activationModeenum of ["automatic", "manual"]automatic
defaultValuestringfalse
orientationenum of ["horizontal", "vertical"]horizontal
valuestring
onValueChangefunction

Tabs List

ElementSelector
Tabs.List.ex-tabs-list
PropTypeDefault
asElementTypediv
asChildbooleanfalse
loopbooleantrue

Tabs Trigger

ElementSelector
Tabs.Trigger.ex-tabs-trigger
PropTypeDefault
asElementTypebutton
asChildbooleanfalse
disabledbooleanfalse
valuestring

Tabs Content

ElementSelector
Tabs.Content.ex-tabs-content
PropTypeDefault
asElementTypediv
asChildbooleanfalse
forceMountbooleanfalse
valuestring

Tabs Section

ElementSelector
ContextMenu.Section.ex-tabs-body
PropTypeDefault
asElementTypediv
asChildbooleanfalse
Last updated on