I am using M3 theme with Angular Material v18. I need a button, filled by primary color as background and on-primary (white actually) as text color.
Is it possible to use Filled and Tonal buttons with Angular Material v18 and M3 theme? Or is it possible to make filled buttons with primary or secondary colors?
At the current moment color="primary"
makes white color on the background with primary color of text. And I don’t know how to do it correctly.
I see that in M3 theme it’s possible to create Filled and Tonal buttons: https://m3.material.io/components/buttons/overview
I see that in documentation of Angular Material there is only Flat button for this reason:
https://material.angular.io/components/button/overview
But as I know, before, with Material 2, it was set something like:
<button class="mat-raised-button mat-primary" mat-stroked-button type="button" color="primary">Some Button</button>
and it was primary color on the background.
Oleksandr Lopatnov is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1