toggle
Two-state button with aria-pressed.
Preview
Markup
<button class="toggle" aria-pressed="true" aria-label="Toggle bold"><svg aria-hidden="true">…</svg></button>Install
Import the component CSS (depends on base/tokens.css):
@import "@russfranky/shadcss/src/components/toggle.css";
…or copy it into your repo with the CLI:
npx @russfranky/shadcss-cli add toggle
Accessibility
Standalone needs JS to flip aria-pressed; use toggle-group for zero-JS
Classes
.toggle .toggle-sm .toggle-lg .toggle-outline .has-text
Dependencies
base/tokens