Skip to main content

angular material - How to show Tooltip

app.component.html

<h2>
  Angular Material - How to show Tooltip
</h2>


<button mat-flat-button
        matTooltip="This is a sample material tooltip"
        color="primary"
        aria-label="Display a material tooltip
          on focused or hovered over">
  I am a button
</button>
app.module.ts [import]

// for material button
import {MatButtonModule} from '@angular/material/button';

// for material tooltip
import {MatTooltipModule} from '@angular/material/tooltip';
More Angular tutorials