Base UI (Angular) tabs switch panels in place: pills, underline, or default chrome, optional icons, and overflow scroll. Copy tabs in and project tab, tab-label, and tab-body. They are for sibling views on one URL, not for routing between pages.
Install with npx base-ui-cli add tabs.
Use type="" to change the tab view. Base theme supports 3 types, "folder", "underline" and "pills".
Control Tabs Labels position with position="" choose between "left", "right" and "center" or "full-width". By default the tabs labels are positioned on left hand side.
Example Labels positioned in the middle below
Example Tabs Labels positioned in the middle below
Examples Tabs Labels distributed horizontally with equal width in the middle below
Add icon="" with the preferred icon name chosen from our Base Icon Pack
Run the following command to add this component to your project:
npx base-ui-cli add tabs
For AI agents
Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.
npx -y base-ui-mcp
Base UI provides standalone components. Import the exact elements you want to use into your component.
// Install: npx base-ui-cli add tabs
// Paths are relative to aliases.components (default: src/app/components)
import { TabBodyComponent } from './tabs/tab-body/tab-body.component';
import { TabLabelComponent } from './tabs/tab-label/tab-label.component';
import { TabComponent } from './tabs/tab/tab.component';
import { TabsComponent } from './tabs/tabs.component';
@Component({
selector: 'app-your-component',
imports: [
TabBodyComponent,
TabComponent,
TabLabelComponent,
TabsComponent
],
template: `...`
})
export class YourComponent {} API for tabs — generated from JSDoc in the library source.
| API | Member | Type | Default | Description |
|---|---|---|---|---|
base-tab | label | string | '' | A simple string label for the tab. If complex HTML is needed, project a `base-tab-label` inside instead. |
base-tab | isActive | boolean | false | Tracks whether this tab is currently selected. |
base-tab | tabClass | unknown | 'cursor-pointer' | Additional CSS classes to apply to the tab trigger. |
base-tab-body | — | — | — | The actual content wrapper for a `base-tab`. Content inside this tag is only rendered/visible when the parent tab is active. |
base-tab-label | — | — | — | A custom label for a `base-tab`. Allows you to add rich content (icons, badges, etc.) as the tab label. |
base-tabs | class | string | '' | Additional host CSS classes (merged via cn()). |
base-tabs | defaultTab | number | 0 | — |
base-tabs | type | string | undefined | undefined | — |
base-tabs | position | string | undefined | undefined | — |
base-tabs | icon | string | undefined | undefined | — |
base-tabs | scrollRestricted | boolean | false | — |
base-tabs | ariaLabel | string | '' | Accessible name for the tab list when a visible label is not present elsewhere. |
base-tabs | labelledBy | string | '' | ID of an external element that labels this tab list. |
base-tabs | (tabChanged) | TabComponent | — | Emitted whenever the active tab changes. |
Content