Tabs
Switch between views, modes or filters. Three looks: segmented (equal items in a track), pills (content-width items for many categories) and line (an underline under the active tab). Pass an array of tabs, or build the list and the panels from parts.
Basic
An array of tabs and [(value)] — the value of the active tab. tabChange fires when the user picks another tab.
Active: overview · changes: 0
Variants
variant: segmented (default) shares the width between the tabs, pills keeps each tab as wide as its text, line draws an underline under the active tab.
Sizes
size="small" makes the segmented control compact — for toolbars and table headers.
Raised
raised puts the control on the card background with a ring and a soft shadow — for tabs placed straight on the page background.
Icons and counters
Each tab can have an icon, a badge counter (0 is shown) and a tooltip.
Description
A tab's description is shown under the control while that tab is active — a short hint about the mode.
Vertical
orientation="vertical" stacks full-width tabs in a column — a settings menu beside the content. Up and Down move between them.
Panels
Build the list and the panels from parts: tx-tab-list with tx-tab, and tx-tab-panels with a tx-tab-panel per value. Tabs and panels are wired for screen readers by their value.
Three open tasks, one due this week.
Four people can open this project.
The last change was made two hours ago.
Scrollable
Tabs that do not fit scroll sideways and the active one scrolls into view. scrollable adds previous / next buttons at the edges; showNavigators hides them.
Lazy
Content in an ng-template txTabPanelContent is created on the first visit and then kept. With lazy, only the active panel is rendered — the others are destroyed when you leave them.
Daily report, rendered at 11:32:38 PM.
Disabled
A disabled tab cannot be picked and the arrow keys skip it.
Links
a[txTab] makes a tab a link — with routerLink it navigates and selects the tab. Here each tab writes a query parameter.
Opened section: Domains
Keyboard
Tab focuses the active tab, the arrow keys move between tabs and Enter or Space picks one. With selectOnFocus the arrow keys pick the tab at once.
Design tokens
dt changes one control — here a rounder track and a green active tab.