Tabs overview
The components surface gives you the default <tng-tabs> shell while the tablist, trigger, and panel directives stay explicit, so you can control layout and markup.
Imports
Import the wrapper root from the components package and the structural parts from primitives.
Wrapper import
ts
import { TngTabs } from '@tailng-ui/components';Required primitive parts
ts
import { TngTab, TngTabList, TngTabPanel } from '@tailng-ui/primitives';Structure
Tabs need one root, one tablist, one or more tab triggers, and one panel for each value you want to reveal.
Basic tabs structure
html
<tng-tabs ariaLabel="Project sections" defaultValue="overview">
<div tngTabList ariaLabel="Project sections">
<button type="button" tngTab value="overview">Overview</button>
<button type="button" tngTab value="activity">Activity</button>
</div>
<section tngTabPanel value="overview">Overview content</section>
<section tngTabPanel value="activity">Activity content</section>
</tng-tabs>
Style variants
The same tabs behavior rendered with a Plain-CSS shell and a Tailwind shell.
Tabs shell (Plain CSS)
The stock wrapper, triggers, and panel are ready without application CSS.
Selection, hover, focus, and disabled states come from the theme contract.
Component variables can tune the visual system from the wrapper host.
Tabs shell (Tailwind CSS)
Behavior baseline
- Use matching
valuestrings on eachtngTabandtngTabPanel. activation="manual"keeps arrow-key focus movement separate from selection.- The wrapper styles the shell, tablist, triggers, panels, orientation, and interactive states. Override component variables when a product surface needs a different visual treatment.