Anatomy
aegov-tabs is a composite of three elements: the parent container, the trigger (aegov-tab), and the content panel (aegov-tab-panel). The parent writes shared configuration — variant, size, orientation, and which tab is active — onto its children, so individual tabs and panels rarely need any prop beyond their own tab-id.

| Item | Name | Description |
|---|---|---|
1 |
Tablist | The row (or column) of triggers, role="tablist" |
2 |
Tab | A single trigger button, role="tab" |
3 |
Icon (optional) | Leading/trailing icon inside a tab, from the icon/icon-end slots |
4 |
Panel | The content shown for the active tab, role="tabpanel" |
Basics
Place aegov-tab triggers in the tabs slot and matching aegov-tab-panel elements in the default slot, pairing each by tab-id. Use default-open to choose which tab starts active.
<aegov-tabs default-open="overview">
<aegov-tab slot="tabs" tab-id="overview">Overview</aegov-tab>
<aegov-tab slot="tabs" tab-id="eligibility">Eligibility</aegov-tab>
<aegov-tab slot="tabs" tab-id="documents">Documents</aegov-tab>
<aegov-tab-panel tab-id="overview">Apply online for a residency permit. Most applications are processed within three working days.</aegov-tab-panel>
<aegov-tab-panel tab-id="eligibility">Open to UAE nationals and residents aged 18 and over with a valid Emirates ID.</aegov-tab-panel>
<aegov-tab-panel tab-id="documents">Upload a clear copy of your Emirates ID, recent utility bill, and proof of residence.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsBasics() {
return (
<AegovTabs defaultOpen="overview">
<AegovTab slot="tabs" tabId="overview">Overview</AegovTab>
<AegovTab slot="tabs" tabId="eligibility">Eligibility</AegovTab>
<AegovTab slot="tabs" tabId="documents">Documents</AegovTab>
<AegovTabPanel tabId="overview">Apply online for a residency permit. Most applications are processed within three working days.</AegovTabPanel>
<AegovTabPanel tabId="eligibility">Open to UAE nationals and residents aged 18 and over with a valid Emirates ID.</AegovTabPanel>
<AegovTabPanel tabId="documents">Upload a clear copy of your Emirates ID, recent utility bill, and proof of residence.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs default-open="overview">
<aegov-tab slot="tabs" tab-id="overview">Overview</aegov-tab>
<aegov-tab slot="tabs" tab-id="eligibility">Eligibility</aegov-tab>
<aegov-tab slot="tabs" tab-id="documents">Documents</aegov-tab>
<aegov-tab-panel tab-id="overview">Apply online for a residency permit. Most applications are processed within three working days.</aegov-tab-panel>
<aegov-tab-panel tab-id="eligibility">Open to UAE nationals and residents aged 18 and over with a valid Emirates ID.</aegov-tab-panel>
<aegov-tab-panel tab-id="documents">Upload a clear copy of your Emirates ID, recent utility bill, and proof of residence.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-basics',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs default-open="overview">
<aegov-tab slot="tabs" tabId="overview">Overview</aegov-tab>
<aegov-tab slot="tabs" tabId="eligibility">Eligibility</aegov-tab>
<aegov-tab slot="tabs" tabId="documents">Documents</aegov-tab>
<aegov-tab-panel tabId="overview">Apply online for a residency permit. Most applications are processed within three working days.</aegov-tab-panel>
<aegov-tab-panel tabId="eligibility">Open to UAE nationals and residents aged 18 and over with a valid Emirates ID.</aegov-tab-panel>
<aegov-tab-panel tabId="documents">Upload a clear copy of your Emirates ID, recent utility bill, and proof of residence.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsBasicsComponent {}
Variants
variant selects the trigger row's visual style: simple (default underline, discreet), segmented (a connected button group for view toggles), or pill (rounded individual chips).
<aegov-tabs variant="simple" default-open="services">
<aegov-tab slot="tabs" tab-id="services">Services</aegov-tab>
<aegov-tab slot="tabs" tab-id="payments">Payments</aegov-tab>
<aegov-tab-panel tab-id="services">A list of services available to UAE residents.</aegov-tab-panel>
<aegov-tab-panel tab-id="payments">Outstanding fees and recent payments.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tab-id="day">Day</aegov-tab>
<aegov-tab slot="tabs" tab-id="week">Week</aegov-tab>
<aegov-tab-panel tab-id="day">Daily appointment schedule.</aegov-tab-panel>
<aegov-tab-panel tab-id="week">Weekly appointment schedule.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="pill" default-open="all">
<aegov-tab slot="tabs" tab-id="all">All requests</aegov-tab>
<aegov-tab slot="tabs" tab-id="open">Open</aegov-tab>
<aegov-tab-panel tab-id="all">Every service request raised on your account.</aegov-tab-panel>
<aegov-tab-panel tab-id="open">Requests still in progress.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsVariants() {
return (
<>
<AegovTabs variant="simple" defaultOpen="services">
<AegovTab slot="tabs" tabId="services">Services</AegovTab>
<AegovTab slot="tabs" tabId="payments">Payments</AegovTab>
<AegovTabPanel tabId="services">A list of services available to UAE residents.</AegovTabPanel>
<AegovTabPanel tabId="payments">Outstanding fees and recent payments.</AegovTabPanel>
</AegovTabs>
<AegovTabs variant="segmented" defaultOpen="day">
<AegovTab slot="tabs" tabId="day">Day</AegovTab>
<AegovTab slot="tabs" tabId="week">Week</AegovTab>
<AegovTabPanel tabId="day">Daily appointment schedule.</AegovTabPanel>
<AegovTabPanel tabId="week">Weekly appointment schedule.</AegovTabPanel>
</AegovTabs>
<AegovTabs variant="pill" defaultOpen="all">
<AegovTab slot="tabs" tabId="all">All requests</AegovTab>
<AegovTab slot="tabs" tabId="open">Open</AegovTab>
<AegovTabPanel tabId="all">Every service request raised on your account.</AegovTabPanel>
<AegovTabPanel tabId="open">Requests still in progress.</AegovTabPanel>
</AegovTabs>
</>
);
}
<template>
<aegov-tabs variant="simple" default-open="services">
<aegov-tab slot="tabs" tab-id="services">Services</aegov-tab>
<aegov-tab slot="tabs" tab-id="payments">Payments</aegov-tab>
<aegov-tab-panel tab-id="services">A list of services available to UAE residents.</aegov-tab-panel>
<aegov-tab-panel tab-id="payments">Outstanding fees and recent payments.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tab-id="day">Day</aegov-tab>
<aegov-tab slot="tabs" tab-id="week">Week</aegov-tab>
<aegov-tab-panel tab-id="day">Daily appointment schedule.</aegov-tab-panel>
<aegov-tab-panel tab-id="week">Weekly appointment schedule.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="pill" default-open="all">
<aegov-tab slot="tabs" tab-id="all">All requests</aegov-tab>
<aegov-tab slot="tabs" tab-id="open">Open</aegov-tab>
<aegov-tab-panel tab-id="all">Every service request raised on your account.</aegov-tab-panel>
<aegov-tab-panel tab-id="open">Requests still in progress.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-variants',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs variant="simple" default-open="services">
<aegov-tab slot="tabs" tabId="services">Services</aegov-tab>
<aegov-tab slot="tabs" tabId="payments">Payments</aegov-tab>
<aegov-tab-panel tabId="services">A list of services available to UAE residents.</aegov-tab-panel>
<aegov-tab-panel tabId="payments">Outstanding fees and recent payments.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tabId="day">Day</aegov-tab>
<aegov-tab slot="tabs" tabId="week">Week</aegov-tab>
<aegov-tab-panel tabId="day">Daily appointment schedule.</aegov-tab-panel>
<aegov-tab-panel tabId="week">Weekly appointment schedule.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs variant="pill" default-open="all">
<aegov-tab slot="tabs" tabId="all">All requests</aegov-tab>
<aegov-tab slot="tabs" tabId="open">Open</aegov-tab>
<aegov-tab-panel tabId="all">Every service request raised on your account.</aegov-tab-panel>
<aegov-tab-panel tabId="open">Requests still in progress.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsVariantsComponent {}
Orientation
orientation="vertical" places triggers beside the panels instead of above them, and swaps the navigation keys from left/right to up/down. A vertical tab row needs a height context from its container.
<aegov-tabs orientation="vertical" default-open="profile">
<aegov-tab slot="tabs" tab-id="profile">Profile</aegov-tab>
<aegov-tab slot="tabs" tab-id="emirates-id">Emirates ID</aegov-tab>
<aegov-tab slot="tabs" tab-id="security">Security</aegov-tab>
<aegov-tab-panel tab-id="profile">Name, date of birth, and primary contact details.</aegov-tab-panel>
<aegov-tab-panel tab-id="emirates-id">Emirates ID number, expiry date, and renewal status.</aegov-tab-panel>
<aegov-tab-panel tab-id="security">Password, recovery email, and active sessions.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsOrientation() {
return (
<AegovTabs orientation="vertical" defaultOpen="profile">
<AegovTab slot="tabs" tabId="profile">Profile</AegovTab>
<AegovTab slot="tabs" tabId="emirates-id">Emirates ID</AegovTab>
<AegovTab slot="tabs" tabId="security">Security</AegovTab>
<AegovTabPanel tabId="profile">Name, date of birth, and primary contact details.</AegovTabPanel>
<AegovTabPanel tabId="emirates-id">Emirates ID number, expiry date, and renewal status.</AegovTabPanel>
<AegovTabPanel tabId="security">Password, recovery email, and active sessions.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs orientation="vertical" default-open="profile">
<aegov-tab slot="tabs" tab-id="profile">Profile</aegov-tab>
<aegov-tab slot="tabs" tab-id="emirates-id">Emirates ID</aegov-tab>
<aegov-tab slot="tabs" tab-id="security">Security</aegov-tab>
<aegov-tab-panel tab-id="profile">Name, date of birth, and primary contact details.</aegov-tab-panel>
<aegov-tab-panel tab-id="emirates-id">Emirates ID number, expiry date, and renewal status.</aegov-tab-panel>
<aegov-tab-panel tab-id="security">Password, recovery email, and active sessions.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-orientation',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs orientation="vertical" default-open="profile">
<aegov-tab slot="tabs" tabId="profile">Profile</aegov-tab>
<aegov-tab slot="tabs" tabId="emirates-id">Emirates ID</aegov-tab>
<aegov-tab slot="tabs" tabId="security">Security</aegov-tab>
<aegov-tab-panel tabId="profile">Name, date of birth, and primary contact details.</aegov-tab-panel>
<aegov-tab-panel tabId="emirates-id">Emirates ID number, expiry date, and renewal status.</aegov-tab-panel>
<aegov-tab-panel tabId="security">Password, recovery email, and active sessions.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsOrientationComponent {}
Sizes
size accepts three tokens — sm, base (default), lg — and scales the trigger row only; panel content is unaffected.
<aegov-tabs size="sm" default-open="a">
<aegov-tab slot="tabs" tab-id="a">Small</aegov-tab>
<aegov-tab slot="tabs" tab-id="b">Compact triggers</aegov-tab>
<aegov-tab-panel tab-id="a">Compact size suits dense administrative dashboards.</aegov-tab-panel>
<aegov-tab-panel tab-id="b">Use this when vertical space is tight.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs size="lg" default-open="a">
<aegov-tab slot="tabs" tab-id="a">Large</aegov-tab>
<aegov-tab slot="tabs" tab-id="b">Prominent triggers</aegov-tab>
<aegov-tab-panel tab-id="a">Large size works well as top-level page navigation.</aegov-tab-panel>
<aegov-tab-panel tab-id="b">Pair with a hero or main content area.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsSizes() {
return (
<>
<AegovTabs size="sm" defaultOpen="a">
<AegovTab slot="tabs" tabId="a">Small</AegovTab>
<AegovTab slot="tabs" tabId="b">Compact triggers</AegovTab>
<AegovTabPanel tabId="a">Compact size suits dense administrative dashboards.</AegovTabPanel>
<AegovTabPanel tabId="b">Use this when vertical space is tight.</AegovTabPanel>
</AegovTabs>
<AegovTabs size="lg" defaultOpen="a">
<AegovTab slot="tabs" tabId="a">Large</AegovTab>
<AegovTab slot="tabs" tabId="b">Prominent triggers</AegovTab>
<AegovTabPanel tabId="a">Large size works well as top-level page navigation.</AegovTabPanel>
<AegovTabPanel tabId="b">Pair with a hero or main content area.</AegovTabPanel>
</AegovTabs>
</>
);
}
<template>
<aegov-tabs size="sm" default-open="a">
<aegov-tab slot="tabs" tab-id="a">Small</aegov-tab>
<aegov-tab slot="tabs" tab-id="b">Compact triggers</aegov-tab>
<aegov-tab-panel tab-id="a">Compact size suits dense administrative dashboards.</aegov-tab-panel>
<aegov-tab-panel tab-id="b">Use this when vertical space is tight.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs size="lg" default-open="a">
<aegov-tab slot="tabs" tab-id="a">Large</aegov-tab>
<aegov-tab slot="tabs" tab-id="b">Prominent triggers</aegov-tab>
<aegov-tab-panel tab-id="a">Large size works well as top-level page navigation.</aegov-tab-panel>
<aegov-tab-panel tab-id="b">Pair with a hero or main content area.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-sizes',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs size="sm" default-open="a">
<aegov-tab slot="tabs" tabId="a">Small</aegov-tab>
<aegov-tab slot="tabs" tabId="b">Compact triggers</aegov-tab>
<aegov-tab-panel tabId="a">Compact size suits dense administrative dashboards.</aegov-tab-panel>
<aegov-tab-panel tabId="b">Use this when vertical space is tight.</aegov-tab-panel>
</aegov-tabs>
<aegov-tabs size="lg" default-open="a">
<aegov-tab slot="tabs" tabId="a">Large</aegov-tab>
<aegov-tab slot="tabs" tabId="b">Prominent triggers</aegov-tab>
<aegov-tab-panel tabId="a">Large size works well as top-level page navigation.</aegov-tab-panel>
<aegov-tab-panel tabId="b">Pair with a hero or main content area.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsSizesComponent {}
Stretchable
Set is-stretchable="true" to distribute triggers evenly across the full container width — each grows to occupy equal space. Useful for a two- or three-way toolbar where every option carries equal weight.
<aegov-tabs variant="segmented" is-stretchable="true" default-open="grid">
<aegov-tab slot="tabs" tab-id="grid">Grid view</aegov-tab>
<aegov-tab slot="tabs" tab-id="list">List view</aegov-tab>
<aegov-tab-panel tab-id="grid">Services arranged as cards in a grid.</aegov-tab-panel>
<aegov-tab-panel tab-id="list">Services arranged as a vertical list.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsStretchable() {
return (
<AegovTabs variant="segmented" isStretchable defaultOpen="grid">
<AegovTab slot="tabs" tabId="grid">Grid view</AegovTab>
<AegovTab slot="tabs" tabId="list">List view</AegovTab>
<AegovTabPanel tabId="grid">Services arranged as cards in a grid.</AegovTabPanel>
<AegovTabPanel tabId="list">Services arranged as a vertical list.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs variant="segmented" is-stretchable="true" default-open="grid">
<aegov-tab slot="tabs" tab-id="grid">Grid view</aegov-tab>
<aegov-tab slot="tabs" tab-id="list">List view</aegov-tab>
<aegov-tab-panel tab-id="grid">Services arranged as cards in a grid.</aegov-tab-panel>
<aegov-tab-panel tab-id="list">Services arranged as a vertical list.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-stretchable',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs variant="segmented" [isStretchable]="true" default-open="grid">
<aegov-tab slot="tabs" tabId="grid">Grid view</aegov-tab>
<aegov-tab slot="tabs" tabId="list">List view</aegov-tab>
<aegov-tab-panel tabId="grid">Services arranged as cards in a grid.</aegov-tab-panel>
<aegov-tab-panel tabId="list">Services arranged as a vertical list.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsStretchableComponent {}
Scrollable
Set is-scrollable="true" to let the trigger row scroll when triggers exceed the container width, rather than wrapping or overflowing. A faded gradient signals scrollable content at each edge, and activating a tab smoothly scrolls it into view.
<aegov-tabs is-scrollable="true" default-open="jan">
<aegov-tab slot="tabs" tab-id="jan">January</aegov-tab>
<aegov-tab slot="tabs" tab-id="feb">February</aegov-tab>
<aegov-tab slot="tabs" tab-id="mar">March</aegov-tab>
<aegov-tab slot="tabs" tab-id="apr">April</aegov-tab>
<aegov-tab slot="tabs" tab-id="may">May</aegov-tab>
<aegov-tab slot="tabs" tab-id="jun">June</aegov-tab>
<aegov-tab-panel tab-id="jan">Statement for January.</aegov-tab-panel>
<aegov-tab-panel tab-id="feb">Statement for February.</aegov-tab-panel>
<aegov-tab-panel tab-id="mar">Statement for March.</aegov-tab-panel>
<aegov-tab-panel tab-id="apr">Statement for April.</aegov-tab-panel>
<aegov-tab-panel tab-id="may">Statement for May.</aegov-tab-panel>
<aegov-tab-panel tab-id="jun">Statement for June.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsScrollable() {
return (
<AegovTabs isScrollable defaultOpen="jan">
<AegovTab slot="tabs" tabId="jan">January</AegovTab>
<AegovTab slot="tabs" tabId="feb">February</AegovTab>
<AegovTab slot="tabs" tabId="mar">March</AegovTab>
<AegovTab slot="tabs" tabId="apr">April</AegovTab>
<AegovTab slot="tabs" tabId="may">May</AegovTab>
<AegovTab slot="tabs" tabId="jun">June</AegovTab>
<AegovTabPanel tabId="jan">Statement for January.</AegovTabPanel>
<AegovTabPanel tabId="feb">Statement for February.</AegovTabPanel>
<AegovTabPanel tabId="mar">Statement for March.</AegovTabPanel>
<AegovTabPanel tabId="apr">Statement for April.</AegovTabPanel>
<AegovTabPanel tabId="may">Statement for May.</AegovTabPanel>
<AegovTabPanel tabId="jun">Statement for June.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs is-scrollable="true" default-open="jan">
<aegov-tab slot="tabs" tab-id="jan">January</aegov-tab>
<aegov-tab slot="tabs" tab-id="feb">February</aegov-tab>
<aegov-tab slot="tabs" tab-id="mar">March</aegov-tab>
<aegov-tab slot="tabs" tab-id="apr">April</aegov-tab>
<aegov-tab slot="tabs" tab-id="may">May</aegov-tab>
<aegov-tab slot="tabs" tab-id="jun">June</aegov-tab>
<aegov-tab-panel tab-id="jan">Statement for January.</aegov-tab-panel>
<aegov-tab-panel tab-id="feb">Statement for February.</aegov-tab-panel>
<aegov-tab-panel tab-id="mar">Statement for March.</aegov-tab-panel>
<aegov-tab-panel tab-id="apr">Statement for April.</aegov-tab-panel>
<aegov-tab-panel tab-id="may">Statement for May.</aegov-tab-panel>
<aegov-tab-panel tab-id="jun">Statement for June.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-scrollable',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs [isScrollable]="true" default-open="jan">
<aegov-tab slot="tabs" tabId="jan">January</aegov-tab>
<aegov-tab slot="tabs" tabId="feb">February</aegov-tab>
<aegov-tab slot="tabs" tabId="mar">March</aegov-tab>
<aegov-tab slot="tabs" tabId="apr">April</aegov-tab>
<aegov-tab slot="tabs" tabId="may">May</aegov-tab>
<aegov-tab slot="tabs" tabId="jun">June</aegov-tab>
<aegov-tab-panel tabId="jan">Statement for January.</aegov-tab-panel>
<aegov-tab-panel tabId="feb">Statement for February.</aegov-tab-panel>
<aegov-tab-panel tabId="mar">Statement for March.</aegov-tab-panel>
<aegov-tab-panel tabId="apr">Statement for April.</aegov-tab-panel>
<aegov-tab-panel tabId="may">Statement for May.</aegov-tab-panel>
<aegov-tab-panel tabId="jun">Statement for June.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsScrollableComponent {}
Disabled tabs
Set is-disabled="true" on an individual aegov-tab to mute it and remove it from arrow-key navigation entirely. Disabled tabs can't be activated by click or keyboard, and never emit a select event.
<aegov-tabs default-open="active">
<aegov-tab slot="tabs" tab-id="active">Active applications</aegov-tab>
<aegov-tab slot="tabs" tab-id="archive" is-disabled="true">Archive</aegov-tab>
<aegov-tab slot="tabs" tab-id="drafts">Drafts</aegov-tab>
<aegov-tab-panel tab-id="active">Applications currently in review.</aegov-tab-panel>
<aegov-tab-panel tab-id="archive">Archive is not yet available.</aegov-tab-panel>
<aegov-tab-panel tab-id="drafts">Saved drafts you have not submitted yet.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsDisabled() {
return (
<AegovTabs defaultOpen="active">
<AegovTab slot="tabs" tabId="active">Active applications</AegovTab>
<AegovTab slot="tabs" tabId="archive" isDisabled>Archive</AegovTab>
<AegovTab slot="tabs" tabId="drafts">Drafts</AegovTab>
<AegovTabPanel tabId="active">Applications currently in review.</AegovTabPanel>
<AegovTabPanel tabId="archive">Archive is not yet available.</AegovTabPanel>
<AegovTabPanel tabId="drafts">Saved drafts you have not submitted yet.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs default-open="active">
<aegov-tab slot="tabs" tab-id="active">Active applications</aegov-tab>
<aegov-tab slot="tabs" tab-id="archive" is-disabled="true">Archive</aegov-tab>
<aegov-tab slot="tabs" tab-id="drafts">Drafts</aegov-tab>
<aegov-tab-panel tab-id="active">Applications currently in review.</aegov-tab-panel>
<aegov-tab-panel tab-id="archive">Archive is not yet available.</aegov-tab-panel>
<aegov-tab-panel tab-id="drafts">Saved drafts you have not submitted yet.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-disabled',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs default-open="active">
<aegov-tab slot="tabs" tabId="active">Active applications</aegov-tab>
<aegov-tab slot="tabs" tabId="archive" [isDisabled]="true">Archive</aegov-tab>
<aegov-tab slot="tabs" tabId="drafts">Drafts</aegov-tab>
<aegov-tab-panel tabId="active">Applications currently in review.</aegov-tab-panel>
<aegov-tab-panel tabId="archive">Archive is not yet available.</aegov-tab-panel>
<aegov-tab-panel tabId="drafts">Saved drafts you have not submitted yet.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsDisabledComponent {}
Tabs with icons
aegov-tab exposes icon (before the label) and icon-end (after the label) slots for visual indicators on a trigger.
<aegov-tabs default-open="profile">
<aegov-tab slot="tabs" tab-id="profile">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
Profile
</aegov-tab>
<aegov-tab slot="tabs" tab-id="documents">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Documents
</aegov-tab>
<aegov-tab-panel tab-id="profile">Personal details and contact information.</aegov-tab-panel>
<aegov-tab-panel tab-id="documents">Identity and supporting documents.</aegov-tab-panel>
</aegov-tabs>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function TabsWithIcons() {
return (
<AegovTabs defaultOpen="profile">
<AegovTab slot="tabs" tabId="profile">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
Profile
</AegovTab>
<AegovTab slot="tabs" tabId="documents">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Documents
</AegovTab>
<AegovTabPanel tabId="profile">Personal details and contact information.</AegovTabPanel>
<AegovTabPanel tabId="documents">Identity and supporting documents.</AegovTabPanel>
</AegovTabs>
);
}
<template>
<aegov-tabs default-open="profile">
<aegov-tab slot="tabs" tab-id="profile">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
Profile
</aegov-tab>
<aegov-tab slot="tabs" tab-id="documents">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Documents
</aegov-tab>
<aegov-tab-panel tab-id="profile">Personal details and contact information.</aegov-tab-panel>
<aegov-tab-panel tab-id="documents">Identity and supporting documents.</aegov-tab-panel>
</aegov-tabs>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-tabs-with-icons',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<aegov-tabs default-open="profile">
<aegov-tab slot="tabs" tabId="profile">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/></svg>
Profile
</aegov-tab>
<aegov-tab slot="tabs" tabId="documents">
<svg slot="icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/></svg>
Documents
</aegov-tab>
<aegov-tab-panel tabId="profile">Personal details and contact information.</aegov-tab-panel>
<aegov-tab-panel tabId="documents">Identity and supporting documents.</aegov-tab-panel>
</aegov-tabs>
`,
})
export class TabsWithIconsComponent {}
RTL support
When the document or any ancestor is dir="rtl", the horizontal layout flows right-to-left and the arrow keys flip — ArrowLeft advances, ArrowRight retreats. Vertical orientation, Home, and End behave the same regardless of direction, and scrollable fade gradients adjust to the correct edge automatically.
<div dir="rtl">
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tab-id="day">اليوم</aegov-tab>
<aegov-tab slot="tabs" tab-id="week">الأسبوع</aegov-tab>
<aegov-tab slot="tabs" tab-id="month">الشهر</aegov-tab>
<aegov-tab-panel tab-id="day">جدول المواعيد اليومي.</aegov-tab-panel>
<aegov-tab-panel tab-id="week">جدول المواعيد الأسبوعي.</aegov-tab-panel>
<aegov-tab-panel tab-id="month">جدول المواعيد الشهري.</aegov-tab-panel>
</aegov-tabs>
</div>
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-react';
export default function RtlTabs() {
return (
<div dir="rtl">
<AegovTabs variant="segmented" defaultOpen="day">
<AegovTab slot="tabs" tabId="day">اليوم</AegovTab>
<AegovTab slot="tabs" tabId="week">الأسبوع</AegovTab>
<AegovTab slot="tabs" tabId="month">الشهر</AegovTab>
<AegovTabPanel tabId="day">جدول المواعيد اليومي.</AegovTabPanel>
<AegovTabPanel tabId="week">جدول المواعيد الأسبوعي.</AegovTabPanel>
<AegovTabPanel tabId="month">جدول المواعيد الشهري.</AegovTabPanel>
</AegovTabs>
</div>
);
}
<template>
<div dir="rtl">
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tab-id="day">اليوم</aegov-tab>
<aegov-tab slot="tabs" tab-id="week">الأسبوع</aegov-tab>
<aegov-tab slot="tabs" tab-id="month">الشهر</aegov-tab>
<aegov-tab-panel tab-id="day">جدول المواعيد اليومي.</aegov-tab-panel>
<aegov-tab-panel tab-id="week">جدول المواعيد الأسبوعي.</aegov-tab-panel>
<aegov-tab-panel tab-id="month">جدول المواعيد الشهري.</aegov-tab-panel>
</aegov-tabs>
</div>
</template>
import { Component } from '@angular/core';
import { AegovTabs, AegovTab, AegovTabPanel } from '@aegov/designsystem-angular';
@Component({
selector: 'app-rtl-tabs',
imports: [AegovTabs, AegovTab, AegovTabPanel],
template: `
<div dir="rtl">
<aegov-tabs variant="segmented" default-open="day">
<aegov-tab slot="tabs" tabId="day">اليوم</aegov-tab>
<aegov-tab slot="tabs" tabId="week">الأسبوع</aegov-tab>
<aegov-tab slot="tabs" tabId="month">الشهر</aegov-tab>
<aegov-tab-panel tabId="day">جدول المواعيد اليومي.</aegov-tab-panel>
<aegov-tab-panel tabId="week">جدول المواعيد الأسبوعي.</aegov-tab-panel>
<aegov-tab-panel tabId="month">جدول المواعيد الشهري.</aegov-tab-panel>
</aegov-tabs>
</div>
`,
})
export class RtlTabsComponent {}
Usage
Here is the recommended usage of tabs on any website or application. These are recommended usage guides, however the developer must use the best practices of web and application development to accurately use this component.
Use tabs for related views of the same object, not for sequential steps
Tabs imply the user can jump between panels in any order and come back — for a fixed, ordered sequence (like a multi-step form), a stepper or wizard pattern communicates the flow far better.
Reach for segmented or pill when the options are really a view toggle, not a content structure
The simple underline variant reads as a structural section divider; segmented/pill read as a mutually-exclusive filter or view switch — pick the one that matches what the tabs are actually doing.
Do not put more triggers in a non-scrollable tab row than comfortably fit
Triggers that wrap onto a second line or get clipped are confusing and hard to scan — either trim the list, or turn on is-scrollable so the row scrolls horizontally instead of wrapping or overflowing.
API reference
The following are the properties and references of tabs
aegov-tabs default properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| DOM |
| auto-generated |
| Visual style of the trigger row: |
|
|
| The |
|
|
| Trigger size token. Only the trigger row scales — panel content is unaffected. Accepts a responsive breakpoint string, e.g. |
|
|
| Layout of the trigger row: |
|
|
| Lets the trigger row scroll (horizontally, or vertically when |
|
|
| Distributes triggers evenly across the full container width — each grows to occupy equal space. Useful for a two- or three-way toolbar where every option carries equal weight. |
|
|
| Accessible label for the underlying |
|
|
aegov-tab properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| Required. Identifier matched against the corresponding |
| required |
| Disables this tab and its panel — muted visually, skipped entirely by arrow-key navigation, and never selectable by click. Sets |
|
|
| Written automatically by the parent | (various) | (inherited) |
aegov-tab-panel properties
| Attribute | Description | Type | Default |
|---|---|---|---|
| Required. Must match the corresponding tab's |
| required |
| Additional CSS classes merged onto the inner panel element. |
| (none) |
| Written automatically by the parent |
|
|
Slots
| Component | Slot | Description |
|---|---|---|
aegov-tabs |
| Place |
aegov-tabs | (default) | Place |
aegov-tab | (default) | The tab's label text. |
aegov-tab |
| Optional icon shown before the label. |
aegov-tab |
| Optional icon shown after the label. |
aegov-tab-panel | (default) | The panel content, shown only while its tab is active. |
Events
| Event | Component | Detail | Description |
|---|---|---|---|
| aegov-tabs |
| Fires after the active tab changes. Detail is the new active |
| aegov-tab |
| Bubbles up from a clicked tab; the parent listens to this internally. Consumers should listen for |
Pass-through attributes
| Attribute | Notes |
|---|---|
| Forwarded onto the rendered outer container. |
| Not forwarded automatically — apply directly to the element, since both render in the light DOM (no shadow root). |
| Use |
| Applied to the host element on all three components. |
Notes
The following notes are applicable of this component.
Built-in accessibility
- The trigger row uses
role="tablist"witharia-orientationreflectingorientation. The defaultaria-labelis bilingual ("Tabs" / "علامات التبويب", auto-detected from the document's direction) — override it withlabel-tablistwhen the tabs control a specific, nameable region. - Each trigger is a real
<button>withrole="tab",aria-selected, andaria-controlspointing at its panel. - Each panel has
role="tabpanel",aria-labelledbypointing at its trigger, and the nativehiddenattribute while inactive — genuinely removed from the accessibility tree and from layout, not just visually hidden. - A real roving-tabindex pattern is implemented: only the active trigger has
tabindex="0"; every other trigger hastabindex="-1", so a singleTabpress moves focus straight into (and out of) the whole tablist, exactly as the WAI-ARIA tabs pattern specifies. - Disabled tabs set
aria-disabled="true"on the trigger rather than the nativedisabledattribute — deliberately, so the trigger itself remains part of the same roving-tabindex/arrow-key model instead of vanishing from it — and are correctly skipped by arrow-key navigation and unclickable. - Activation follows focus: moving focus to a tab (by click or arrow key) also activates it and reveals its panel immediately — there's no separate "confirm" step.
Developer responsibility
The following is required for a developer to add additionally or pay attention to regarding this component.
- Give every
aegov-tab/aegov-tab-panelpair a unique, matchingtab-id. - Give every trigger a real, meaningful accessible name in its default slot. If a trigger is icon-only, include visually-hidden text alongside the icon rather than relying on the icon alone.
- Override
label-tablistwhenever the tabs control an identifiable region (e.g."Account sections") — the bilingual default is a reasonable generic fallback, not a substitute for a specific label. - If a panel holds a heavy asset (a chart, a large image), consider deferring its load until
aegovTabChangereports that panel'stab-idas active, rather than loading every panel's content up front. aegov-tabandaegov-tab-panelmust be used insideaegov-tabs—aegov-tab-panelthrows if it isn't;aegov-tablogs a console error but still renders.
Keyboard support
| Key | Horizontal (default) | Vertical |
|---|---|---|
| Arrow Right | Moves to and activates the next tab. | (no effect) |
| Arrow Left | Moves to and activates the previous tab. | (no effect) |
| Arrow Down | (no effect) | Moves to and activates the next tab. |
| Arrow Up | (no effect) | Moves to and activates the previous tab. |
| Home | Moves to and activates the first tab. | Same. |
| End | Moves to and activates the last tab. | Same. |
| Tab | Moves focus into the tablist (landing on the active trigger) or out of it entirely — never between individual triggers. | Same. |
Arrow-key navigation wraps at both ends and always skips disabled tabs. In a right-to-left document, the horizontal arrows invert — Arrow Left advances and Arrow Right retreats — while vertical navigation, Home, and End stay the same in either direction.