Skip to main content

angular material - How to align Tabs

app.component.html

<h2 style="padding-top:25px; padding-bottom:25px;">
    Angular Material - How to align Tabs
</h2>


<mat-tab-group mat-align-tabs="start">
    <mat-tab label="Tab A">First tab content</mat-tab>
    <mat-tab label="Tab B">Second tab content</mat-tab>
    <mat-tab label="Tab C">Third tab content</mat-tab>
</mat-tab-group>

<mat-tab-group mat-align-tabs="center">
    <mat-tab label="Tab A">First tab content</mat-tab>
    <mat-tab label="Tab B">Second tab content</mat-tab>
    <mat-tab label="Tab C">Third tab content</mat-tab>
</mat-tab-group>

<mat-tab-group mat-align-tabs="end">
    <mat-tab label="Tab A">First tab content</mat-tab>
    <mat-tab label="Tab B">Second tab content</mat-tab>
    <mat-tab label="Tab C">Third tab content</mat-tab>
</mat-tab-group>
app.module.ts [import]

import { MatTabsModule } from '@angular/material/tabs'
More Angular tutorials