Import
Basic Usage
Appearance
Buttons support multiple appearance styles through thematButton attribute:
API Reference
MatButton
Selector:button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button]
Exported as: matButton, matAnchor
Properties
| Name | Type | Description |
|---|---|---|
@Input() appearance | MatButtonAppearance | Appearance of the button. Options: ‘text’, ‘filled’, ‘elevated’, ‘outlined’, ‘tonal’ |
@Input() color | ThemePalette | Theme color. Options: ‘primary’, ‘accent’, ‘warn’ |
@Input() disabled | boolean | Whether the button is disabled |
@Input() disableRipple | boolean | Whether ripples are disabled |
Types
Examples
With Icons
Anchor Button
Disabled State
Accessibility
- Use semantic
<button>elements for actions - Use
<a>elements for navigation - Provide clear, descriptive button text
- Use
aria-labelfor icon-only buttons