Capítulo 33 de 43
Layered content panels shown one at a time, selected via a horizontally or vertically arranged set of triggers.
Root → List (→ Triggers) + one Content per Trigger, matched by shared value.activationMode (default "automatic"): automatic means arrow-key focus movement also activates the tab immediately; "manual" requires an explicit Enter/Space to activate after arrowing to a trigger — matters for expensive-to-render tab content.List's loop (default true): arrow-key wrap-around at the ends.Content's forceMount: keep inactive tab content mounted (e.g. to preserve scroll position or avoid remount cost) instead of Radix's default unmount-when-inactive behavior.<Tabs.Root defaultValue="tab1" orientation="vertical">
<Tabs.List aria-label="tabs example">
<Tabs.Trigger value="tab1">One</Tabs.Trigger>
<Tabs.Trigger value="tab2">Two</Tabs.Trigger>
</Tabs.List>
<Tabs.Content value="tab1">Tab one content</Tabs.Content>
<Tabs.Content value="tab2">Tab two content</Tabs.Content>
</Tabs.Root>
orientation prop and CSS layout change.activationMode="manual" when tab content is expensive to render/fetch — otherwise every arrow-key press triggers a content swap, not just a focus move.List needs an aria-label (or aria-labelledby) since it doesn't have implicit accessible text of its own.forceMount on Content when you need inactive panels to stay in the DOM (e.g. preserving an iframe's or a video's playback state across tab switches).