Button
Applies to <button>, <a class="re-button">, and submit/reset inputs.
Variants
Section titled “Variants”<div class="row">
<button type="button" class="re-button">Primary</button>
<button type="button" class="re-button" data-variant="secondary">Secondary</button>
<button type="button" class="re-button" data-variant="ghost">Ghost</button>
<button type="button" class="re-button" data-variant="danger">Danger</button>
</div> <div class="row">
<button type="button" class="re-button" data-size="sm">Small</button>
<button type="button" class="re-button" data-size="md">Medium</button>
<button type="button" class="re-button" data-size="lg">Large</button>
</div> Accessibility
Section titled “Accessibility”- Keyboard — fully native.
Tabmoves focus to the control;EnterandSpaceactivate a<button>(atype="submit"button also submits its form,type="reset"resets it). When the class is on an<a href>, anchor semantics apply:Enterfollows the link. - Focus — a visible
:focus-visiblering (--re-shadow-focusbox-shadow) is drawn only for keyboard focus, so pointer clicks stay quiet while keyboard users get a clear indicator. - Semantics — relies entirely on the host element, so assistive tech announces the native
buttonorlinkrole and the visible text label — noroleoraria-*is added. Variant and size aredata-*attributes with no semantic effect. - Notes — use the native
disabledattribute to remove a button from the tab order and the accessibility tree; usearia-disabled="true"instead when the control must stay focusable and discoverable (both render dimmed and setpointer-events: none). Because labels come from the host element, an icon-only button still needs accessible text (e.g.aria-labelor.re-sr-only). See the accessibility guide.