import { KbqTabsModule } from '@koobiq/components/tabs';Decorates the `ng-template` tags and reads out the template from it.
Selector: [kbqTabContent]
| Name | Description |
|---|---|
| template: TemplateRef |
Used to flag tab labels for use with the portal directive
Selector: [kbq-tab-label], [kbqTabLabel]
| Name | Description |
|---|---|
| context: C | Contextual data to be passed in to the embedded view. |
| injector: Injector | The injector to use for the embedded view. |
| isAttached: boolean | Whether this portal is attached to a host. |
| origin: ElementRef |
|
| templateRef: TemplateRef |
The embedded template that will be used to instantiate an embedded View in the host. |
| viewContainerRef: ViewContainerRef | Reference to the ViewContainer into which the template will be stamped out. |
Selector: kbq-tab
Exported as: kbqTab| Name | Description |
|---|---|
@Input() disabled: boolean
|
|
@Input() empty: boolean
|
|
@Input() tabId: string
|
|
@Input('label')
textLabel: string
|
Plain text label for the tab, used when there is no template label. |
@Input() tooltipPlacement: "top" | "topLeft" | "topRight" | "right" | "rightTop" | "rightBottom" | "left" | "leftTop" | "leftBottom" | "bottom" | "bottomLeft" | "bottomRight"
|
|
@Input() tooltipTitle: string
|
|
| explicitContent: TemplateRef |
Template provided in the tab content that will be used if present, used to enable lazy-loading |
| implicitContent: TemplateRef |
Template inside the KbqTab view that contains an ` |
| isActive: boolean | Whether the tab is currently active. |
| isOverflown: boolean | |
| origin: number | The initial relatively index origin of the tab if it was created and selected after there was already a selected tab. Provides context of what position the tab should originate from. |
| overflowTooltipTitle: string | |
| position: number | The relatively indexed position where 0 represents the center, negative is left, and positive represents the right. |
| stateChanges: Subject |
Emits whenever the internal state of the tab changes. |
| templateLabel: KbqTabLabel |
Navigation component matching the styles of the tab group header.
Selector: [kbqTabNavBar], [kbq-tab-nav-bar]
Exported as: kbqTabNavBar| Name | Description |
|---|---|
@Input() onSurface: boolean
|
|
@Input() tabNavPanel: KbqTabNavPanel
|
Associated tab panel controlled by the nav bar. |
@Input() transparent: boolean
|
Whether the nav bar background should be transparent. |
@Input() underlined: boolean
|
Whether the nav bar should be underlined. |
| activeTabOffsetLeft: number | |
| activeTabOffsetWidth: number | |
| changeDetectorRef: ChangeDetectorRef | |
| destroyRef: DestroyRef | |
| disablePagination: boolean | Whether pagination should be disabled. This can be used to avoid unnecessary layout recalculations if it's known that pagination won't be required. |
| disableScrollAfter: boolean | Whether the tab list can be scrolled more towards the end of the tab label list. |
| disableScrollBefore: boolean | Whether the tab list can be scrolled more towards the beginning of the tab label list. |
| elementRef: ElementRef |
|
| focusIndex: number | Tracks which element has focus; used for keyboard navigation |
| indexFocused: EventEmitter |
Event emitted when a label is focused. |
| items: QueryList |
|
| nextPaginator: ElementRef |
|
| previousPaginator: ElementRef |
|
| role: string | |
| scrollDistance: number | Sets the distance in pixels that the tab header should be transformed in the X-axis. |
| selectFocusedIndex: EventEmitter |
Event emitted when the option is selected. |
| selectedIndex: number | The index of the active tab. |
| showPaginationControls: boolean | Whether the controls for pagination should be displayed |
| tabList: ElementRef |
|
| tabListContainer: ElementRef |
|
| vertical: boolean | Whether the tabs should be displayed vertically. |
Selector: kbq-tab-group[kbq-align-tabs-center], [kbq-tab-nav-bar][kbq-align-tabs-center], [kbqTabNavBar][kbq-align-tabs-center]
Selector: kbq-tab-group[kbq-align-tabs-end], [kbq-tab-nav-bar][kbq-align-tabs-end], [kbqTabNavBar][kbq-align-tabs-end]
Selector: kbq-tab-group[kbq-stretch-tabs], [kbq-tab-nav-bar][kbq-stretch-tabs], [kbqTabNavBar][kbq-stretch-tabs]
Selector: kbq-tab-group[vertical], [kbq-tab-nav-bar][vertical], [kbqTabNavBar][vertical]
Tab-group component. Supports basic tab pairs (label + content) and includes keyboard navigation.
Selector: kbq-tab-group
Exported as: kbqTabGroup| Name | Description |
|---|---|
@Input() activeTab: KbqTab
|
|
@Input() animationDuration: string
|
Duration for the tab animation. Must be a valid CSS value (e.g. 600ms). |
@Input() disabled: boolean
|
|
@Input() dynamicHeight: boolean
|
Whether the tab group should grow to the size of the active tab. |
@Input() headerPosition: KbqTabHeaderPosition
|
Position of the tab header. |
@Input() onSurface: boolean
|
|
@Input() selectedIndex: number
|
The index of the active tab. |
@Input() transparent: boolean
|
|
@Input() underlined: boolean
|
|
@Input() vertical: boolean
|
|
@Output('activeTabChange')
activeTabChange: EventEmitter |
Event emitted when the tab selection has changed. |
@Output('animationDone')
animationDone: EventEmitter |
Event emitted when the body animation has completed |
@Output('focusChange')
focusChange: EventEmitter |
Event emitted when focus has changed within a tab group. |
@Output('selectedIndexChange')
selectedIndexChange: EventEmitter |
Output to enable support for two-way binding on `[(selectedIndex)]` |
@Output('selectedTabChange')
selectedTabChange: EventEmitter |
Event emitted when the tab selection has changed. |
| resizeStream: Subject |
|
| tabBodyWrapper: ElementRef |
|
| tabHeader: KbqTabHeader | |
| tabs: QueryList |
Link inside of a KbqTabNavBar.
Selector: [kbqTabLink], [kbq-tab-link]
Exported as: kbqTabLink| Name | Description |
|---|---|
@Input() active: boolean
|
Whether the link is active. |
@Input() disabled: boolean
|
Whether the tab link is disabled. |
@Input() id: string
|
Unique id for the link. |
| ariaControls: string | Link aria-controls attribute value. |
| ariaCurrent: string | Link aria-current attribute value. |
| ariaSelected: string | Link aria-selected attribute value. |
| elementRef: ElementRef |
|
| role: string | Link role attribute value. |
| underlined: boolean | |
| vertical: boolean |
Tab panel component associated with KbqTabNav.
Selector: [kbqTabNavPanel]
Exported as: kbqTabNavPanel| Name | Description |
|---|---|
@Input() id: string
|
Unique id for the tab panel. |
| activeTabId: string | Id of the active tab in the nav bar. |
A simple change event emitted on focus or selection changes.
| Name | Description |
|---|---|
| index: number | Index of the currently-selected tab. |
| tab: KbqTab | Reference to the currently-selected tab. |
Object that can be used to configure the default options for the tabs module.
| Name | Description |
|---|---|
| animationDuration: string | Duration for the tab animation. Must be a valid CSS value (e.g. 600ms). |
The directions that scrolling can go in when the header's tabs exceed the header width. 'After' will scroll the header towards the end of the tabs list and 'before' will scroll towards the beginning of the list.
type ScrollDirection = 'after' | 'before';
These position states are used internally as animation states for the tab body. Setting the position state to left, right, or center will transition the tab body from its current position to its respective state. If there is not current position (void, in the case of a new tab body), then there will be no transition animation to its state. In the case of a new tab body that should immediately be centered with an animating transition, then left-origin-center or right-origin-center can be used, which will use left or right as its pseudo-prior state.
type KbqTabBodyPositionState = 'left' | 'center' | 'right' | 'left-origin-center' | 'right-origin-center';
The origin state is an internally used state that is set on a new tab body indicating if it began to the left or right of the prior selected index. For example, if the selected index was set to 1, and a new tab is created and selected at index 2, then the tab body would have an origin of right because its index was greater than the prior selected index.
type KbqTabBodyOriginState = 'left' | 'right';
Possible positions for the tab header.
type KbqTabHeaderPosition = 'above' | 'below';
type KbqTabSelectBy = string | number | ((tabs: KbqTab[]) => KbqTab | null);
const KBQ_TAB_LABEL: InjectionToken<KbqTabLabel>;
const kbqTabsAnimations: { readonly translateTab: AnimationTriggerMetadata; };
Injection token that can be used to provide the default options the tabs module.
const KBQ_TABS_CONFIG: InjectionToken<KbqTabsConfig>;