import {MatTooltipModule} from '@angular/material/tooltip';
MatTooltip
Directive that attaches a material design tooltip to the host element. Animates the showing and hiding of a tooltip provided position (defaults to below the element).
https://material.io/design/components/tooltips.html
Selector: [matTooltip]
Exported as: matTooltipName | Description |
---|---|
@Input('matTooltipDisabled')
| Disables the display of the tooltip. |
@Input('matTooltipHideDelay')
| The default delay in ms before hiding the tooltip after hide is called |
@Input('matTooltip')
| The message to be displayed in the tooltip |
@Input('matTooltipPosition')
| Allows the user to define the position of the tooltip relative to the parent element |
@Input('matTooltipShowDelay')
| The default delay in ms before showing the tooltip after show is called |
@Input('matTooltipClass')
| Classes to be passed to the tooltip. Supports the same syntax as |
hide | |
---|---|
Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input | |
Parameters | |
delay number = this.hideDelay |
show | |
---|---|
Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input | |
Parameters | |
delay number = this.showDelay |
toggle | |
---|---|
Shows/hides the tooltip |
MatTooltipDefaultOptions
Default matTooltip
options that can be overridden.
Name | Description |
---|---|
| |
| |
|
TooltipPosition
Type: 'left' | 'right' | 'above' | 'below' | 'before' | 'after'
TooltipVisibility
Type: 'initial' | 'visible' | 'hidden'