Navbar Tabs
The NavbarTabs component provides a responsive navigation tab system that automatically handles overflow by moving extra tabs to a dropdown menu in your Angular applications.
API referenceโ
Inputsโ
| Property | Type | Description |
|---|---|---|
showCount | Input<boolean> | Determines whether the count should be displayed in the navbar tabs component. |
Usageโ
sample.component.ts
import { NavbarTabsComponent } from "@angular/atomic-angular";
@Component({
selector: "sample-component",
imports: [NavbarTabsComponent],
template: `
<navbar-tabs [showCount]="true" />
`,
}) export class SampleComponent {
// The component automatically reads routes from router configuration
// and displays them as tabs
}
Featuresโ
- Automatically generates tabs from router configuration
- Handles responsive overflow with dropdown menu for extra tabs
- Supports tab icons
- Preserves search text when switching tabs
- Integrates with router for navigation
Visual Schemaโ
UI Layoutโ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ NavbarTabsComponent โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโ โ
โ โ Tab 1 โ โ Tab 2 โ โ Tab 3 โ โ โฎ โ โ
โ โ (Visible Tab) โ โ (Visible Tab) โ โ (Visible Tab) โ โ(Overflowโ โ
โ โโโโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ Menu) โ โ
โ โโโโโโโโโโโ โ
โ โผ โ
โ โโโโโโโโโโโโโ โ
โ โ Tab 4 โ โ
โ โ Tab 5 โ โ
โ โ Tab 6 โ โ
โ โโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Component Flow Diagramโ
Component Architectureโ
Responsive Behavior Visualizationโ
Component Flowโ
- Router Configuration: Reads tab information from the Angular router configuration
- Tab Generation: Creates tabs from router routes with paths and display names
- Overflow Detection: Uses
overflowManagerdirective to detect available space - Visible Tab Count: Updates
visibleTabCountsignal when layout changes - Overflow Menu: Places tabs that don't fit (using
moreTabs()computed property) into a dropdown menu - Navigation: When a tab is clicked, it uses router navigation and maintains query parameters