Skip to main content

HTML elements

Built-in widgets

Open and close content, and show dialogs, with native elements and no script.

Hides extra content behind a summary the user opens and closes, with no script needed. It starts closed unless you add open.

What is LUZ?

A vanilla design system in plain CSS and ES modules.

HTML
<details>
  <summary>What is LUZ?</summary>
  <p>A vanilla design system in plain CSS and ES modules.</p>
</details>

Styled by elements/interactive.css, with no class.

A box above the page for a task or a message. Opened with showModal() it makes the rest of the page inert, shows a backdrop and closes with Escape. The button here opens it with no script.

A native dialog

Press Escape or the button to close it.

HTML
<button class="luz-btn luz-btn--primary" type="button" command="show-modal" commandfor="d-dialog">Open dialog</button>
<dialog id="d-dialog" aria-labelledby="d-dialog-title">
  <h4 id="d-dialog-title">A native dialog</h4>
  <p>Press Escape or the button to close it.</p>
  <form method="dialog">
    <button class="luz-btn luz-btn--primary">Close</button>
  </form>
</dialog>

Styled by elements/interactive.css, with no class. A dialog with no class gets a surface and its centering back. .luz-modal is the component with a header, body and footer.

<geolocation>

Experimental MDN reference for the geolocation element

A button drawn by the browser that shares the visitor's location and handles the permission prompt itself. Experimental and of limited availability: check the compatibility table on MDN. The autolocate and watch attributes control when it reads the position.

Markup only: this element is not rendered.

HTML
<geolocation>
  <button id="fallback">Use location</button>
</geolocation>

LUZ adds no style: the browser look is kept.

The label of a details that always stays in view: clicking it opens and closes the rest. LUZ gives it a hover and a focus ring.

What is LUZ?

A vanilla design system in plain CSS and ES modules.

HTML
<details>
  <summary>What is LUZ?</summary>
  <p>A vanilla design system in plain CSS and ES modules.</p>
</details>

Styled by elements/interactive.css, with no class.