W3cubDocs

/Angular

Tab

A selectable tab in a TabList.

API

class Tab implements HasElement ,OnInit ,OnDestroy {
  readonly element: HTMLElement;
  readonly @Input() id: InputSignal<any>;
  readonly @Input() disabled: InputSignalWithTransform<boolean, unknown>;
  readonly @Input() value: InputSignal<string>;
  readonly active: Signal<any>;
  readonly selected: Signal<any>;
  open(): void;
}

element

HTMLElement

A reference to the host element.

id

InputSignal<any>

A unique identifier for the widget.

disabled

InputSignalWithTransform<boolean, unknown>

Whether a tab is disabled.

value

InputSignal<string>

The remote tabpanel unique identifier.

active

Signal<any>

Whether the tab is active.

selected

Signal<any>

Whether the tab is selected.

open

void

Opens this tab panel.

@returnsvoid

ngOnInit

void
@returnsvoid

ngOnDestroy

void
@returnsvoid

Description

A selectable tab in a TabList.

The ngTab directive represents an individual tab control within an ngTabList. It requires a value that uniquely identifies it and links it to a corresponding ngTabPanel.

<li ngTab value="myTabId" [disabled]="isTabDisabled">
  My Tab Label
</li>

Super-powered by Google ©2010–2025.
Code licensed under an MIT-style License. Documentation licensed under CC BY 4.0.
https://angular.dev/api/aria/tabs/Tab