Los botones principales deben usar la clase md-filled-button. Solo se pone un botón principal por pagina.
Los botones secundarios deben usar la clase md-outline-button.
| 1 | <!DOCTYPE html> |
| 2 | <html lang="es" class="light dark"> |
| 3 | |
| 4 | <head> |
| 5 | |
| 6 | <meta charset="UTF-8"> |
| 7 | <title>Botones - PWA con MD</title> |
| 8 | |
| 9 | <script src="js/registraServiceWorker.js"></script> |
| 10 | |
| 11 | <meta name="viewport" content="width=device-width"> |
| 12 | <meta name="theme-color" content="#fffbfe"> |
| 13 | <link rel="icon" sizes="32x32" href="favicon.ico"> |
| 14 | <link rel="manifest" href="site.webmanifest"> |
| 15 | <script src="ungap/custom-elements.js"></script> |
| 16 | |
| 17 | <script type="module" src="js/configura.js"></script> |
| 18 | <link rel="stylesheet" href="css/estilos.css"> |
| 19 | <link rel="stylesheet" href="css/transicion_completa.css"> |
| 20 | |
| 21 | </head> |
| 22 | |
| 23 | <body> |
| 24 | |
| 25 | <md-top-app-bar> |
| 26 | |
| 27 | <h1>Botones</h1> |
| 28 | |
| 29 | <button is="md-menu-button" slot="navigation"></button> |
| 30 | |
| 31 | </md-top-app-bar> |
| 32 | |
| 33 | <main> |
| 34 | |
| 35 | <p> |
| 36 | |
| 37 | <button class="md-filled-button"> |
| 38 | Primario |
| 39 | </button> |
| 40 | |
| 41 | <button class="md-outline-button"> |
| 42 | Secundario |
| 43 | </button> |
| 44 | |
| 45 | </p> |
| 46 | |
| 47 | </main> |
| 48 | |
| 49 | <nav-drw></nav-drw> |
| 50 | |
| 51 | </body> |
| 52 | |
| 53 | </html> |
Los botones en Material Design están definidos en https://m3.material.io/components/buttons/overview.