Burger
A hamburger menu toggle button that animates between a hamburger glyph and an X, dispatching a change event on every toggle.
Preview
Attributes
| Attribute | Type | Default | Description |
|---|---|---|---|
open | boolean | — | Reflects the toggled open state |
size | string | 1.5rem | CSS length for the glyph box |
label | string | — | Accessible label (i18n default "Menu") |
Installation
pura is copy-paste and dependency-free. Load the whole library, or just this component.
<link rel="stylesheet" href="/pura/tokens.css">
<script type="module" src="/pura/lib/burger.js"></script> import "./pura/lib/burger.js";