BaselineLab

Playground de dialog en HTML

Explora dialog con una previsualización mínima formada solo por el botón de apertura y el modal. Cambia command, commandfor y closedby sin generar CSS.

HTML
<button type="button" commandfor="baseline-dialog" command="show-modal">
  Abrir modal
</button>

<dialog id="baseline-dialog" closedby="any">
  <h2>Dialog nativo</h2>
  <p>Este modal usa dialog, command, commandfor y closedby sin añadir CSS.</p>
  <button type="button" commandfor="baseline-dialog" command="close">
    Cerrar
  </button>
</dialog>
JS