app.component.html
<h2>Angular Material - Button toggle group appearance</h2>
<div style="padding:25px; background-color:lightgray;">
<h3>Appearance Standard (Default)</h3>
<mat-button-toggle-group
#toggleGroup="matButtonToggleGroup" appearance="standard">
<mat-button-toggle value="html">
HTML
</mat-button-toggle>
<mat-button-toggle value="css">
CSS
</mat-button-toggle>
<mat-button-toggle value="javascript">
JavaScript
</mat-button-toggle>
</mat-button-toggle-group>
</div>
<div style="padding:25px; background-color:lightgray;">
<h3>Appearance Legacy</h3>
<mat-button-toggle-group
#toggleGroupLegacy="matButtonToggleGroup" appearance="legacy">
<mat-button-toggle value="flash">
Flash
</mat-button-toggle>
<mat-button-toggle value="dreamweaver">
Dreamweaver
</mat-button-toggle>
<mat-button-toggle value="photoshop">
Photoshop
</mat-button-toggle>
<mat-button-toggle value="illustrator">
Illustrator
</mat-button-toggle>
</mat-button-toggle-group>
</div>
<h1 style="padding:25px;">
You selected : {{toggleGroup.value}}
</h1>
<h1 style="padding-left:25px;">
You selected : {{toggleGroupLegacy.value}}
</h1>
app.module.ts [import]
import {MatButtonToggleModule} from '@angular/material/button-toggle';
- angular material - How to set Button toggle appearance
- angular material - Button toggle group icon only
- angular material - Icon only Button toggle
- angular material - Vertical Button toggle group
- angular material - Show Tooltip on a specific position
- angular material - How to change Tooltip background color
- angular material - How to apply custom css style in Tooltip
- angular material - Show & hide Tooltip on button click
- angular material - Toggle Tooltip visibility on button click
- angular material - How to use Divider
- angular material - Progress bar with percentage
- angular material - How to use indeterminate Progress bar
- angular material - How to use buffer Progress bar
- angular - How to do a task after a delay
- angular - How to use setInterval()