Skip to main content

angular material - How to use Tabs

app.component.html

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


<mat-tab-group>
    <mat-tab label="First Tab">
        Lorem ipsum dolor sit amet, consectetur adipiscing elit.
        Nam tincidunt elit non molestie rutrum.
        Donec blandit risus et sem iaculis aliquam.
    </mat-tab>

    <mat-tab label="Second Tab">
        Cras feugiat pharetra dolor, ac euismod tellus maximus eu.
        Etiam dignissim enim vel lacus molestie, in iaculis tellus
        ultrices.
    </mat-tab>

    <mat-tab label="Third Tab">
        Integer rhoncus tristique felis ut dignissim.
    </mat-tab>
</mat-tab-group>
app.module.ts [import]

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