tabs/src/tab/tab.component.ts
Developer Preview – This component is in an early stage of development and may undergo breaking changes. Feedback welcome!
A selectable Tab in a TabList.
Tab represents an individual tab control within a TabList. It requires an identifier that uniquely identifies it and links it to a corresponding TabPanel. Additionally it requires a label that is displayed on the tab.
Optionally you can provide an icon name. If an icon is provided, the label will be visually hidden but used as
tooltip text. Please refer to the documentation of @talenra/icons for a list of available icons.
Tab supports a counter badge that can display a number. If the counter exceeds a specified maximum value, it will
display as '
import { TabComponent } from '@talenra/components/tabs';| changeDetection | ChangeDetectionStrategy.OnPush |
| HostDirectives |
Tab
Inputs : value: identifier disabled
|
| host | { |
| selector | talenra-tab |
| imports |
BadgeComponent
IconComponent
TooltipDirective
|
| templateUrl | ./tab.component.html |
| styleUrl | ./tab.component.scss |
Properties |
|
Inputs |
| counter |
Type : number, unknown
|
Default value : 0, { transform: numberAttribute }
|
|
Number displayed in a badge. Example : |
| icon |
Type : string
|
Default value : ''
|
|
Name of the icon to display on the Tab. If provided, the icon will be shown instead of the label text. Example : |
| label |
Type : string
|
| Required : true |
|
Label displayed on the Tab. If an icon is provided, the label is visually hidden but used as tooltip text. Example : |
| Public Readonly identifier |
Type : unknown
|
Default value : this.tab.value
|
|
Unique identifier. Used to associate the Tab with its corresponding TabPanel. Example : |