Tabs
Panels that share one space, switched by a row of tab buttons.
Installation
Usage
src/app/app.ts
- A trigger and a panel belong together when their
valuematches. - Set a starting
value. With the default'', no tab is active and every panel is hidden. - Triggers wrap their content in
<text>, so pass plain text. - The tab bar hugs its triggers instead of filling the width.
Without a signal
A plain value sets the starting tab. changed emits the value of each tab the user taps.
Panels keep their state
Every panel stays rendered, and inactive ones are hidden rather than removed. So components inside a panel keep their state when the user switches away and back.
When the active tab changes, the new panel slides in from the side of the tab that was tapped.
API
UiTabs
UiTabsTrigger
No outputs.
UiTabsContent
No outputs.
All other sub-components (UiTabsList) accept class.
