Button
Buttons with a scan-fill hover effect and glow physics. Use .btn with a variant modifier: 4 variants, 3 sizes, icon mode.
Variants
<button class="btn btn-primary">Primary</button> <button class="btn btn-secondary">Secondary</button> <button class="btn btn-ghost">Ghost</button> <button class="btn btn-danger">Danger</button>
Sizes
<button class="btn btn-primary btn-sm">Small</button> <button class="btn btn-primary">Default</button> <button class="btn btn-primary btn-lg">Large</button> <!-- Icon-only — square clip-path, provide aria-label --> <button class="btn btn-primary btn-icon" aria-label="Add"> <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"> <path d="M12 5v14M5 12h14"/> </svg> </button>
Shapes
<button class="btn btn-primary btn-cut">Cut</button> <button class="btn btn-primary btn-bevel">Bevel</button> <button class="btn btn-primary btn-round">Round</button> <button class="btn btn-primary btn-square">Square</button>
States
<!-- Native disabled — removes from tab order --> <button class="btn btn-primary" disabled>Disabled (native)</button> <!-- aria-disabled — stays in tab order, announces state to screen readers --> <button class="btn btn-primary" aria-disabled="true" tabindex="-1">Disabled (aria)</button> <button class="btn btn-secondary" disabled>Secondary off</button>
CSS Variable API
| Variable | Default | Description |
|---|---|---|
| --btn-bg | rgba(255,255,255,0.04) | Background (solid, gradient, or multi-layer) |
| --btn-color | rgba(240,235,224,0.55) | Text colour |
| --btn-filter | none | Resting drop-shadow / glow |
| --btn-scan-color | rgba(255,255,255,0.07) | Scan-fill accent colour |
| --btn-hover-bg | falls back to --btn-bg | Hover background |
| --btn-hover-color | rgba(240,235,224,0.90) | Hover text colour |
| --btn-hover-filter | none | Hover glow + brightness |
| --btn-hover-text-shadow | none | Hover text luminescence |
| --btn-active-filter | none | Active-press filter |
| --btn-interior | transparent | Inner fill for outlined variants |
| --btn-inner-clip | none | Inner polygon for outlined variants (size classes set automatically) |
Custom Variant
Override only the variables you need. The plasma example below creates a purple neon button.
.btn-plasma { --btn-bg: rgba(139, 0, 255, 0.38); --btn-color: #BF5FFF; --btn-filter: drop-shadow(0 0 8px rgba(139,0,255,0.45)); --btn-scan-color: rgba(139, 0, 255, 0.18); --btn-hover-filter: drop-shadow(0 0 22px rgba(139,0,255,1)) brightness(1.10); --btn-hover-text-shadow: 0 0 16px rgba(200,100,255,0.7); }
When to Use
Use buttons for actions that trigger an immediate operation: submitting a form, opening a dialog, or running a command. Don't use them for navigation between pages.
✓ Do
- Use
.btn-primaryfor the single most important action in a view - Pair with
.btn-ghostor.btn-secondaryfor secondary/cancel actions - Use
.btn-iconwhen space is tight and the action is universally understood - Keep labels short: 1–3 words, active voice (Save, Delete, Confirm)
- Use
.btn-lgfor touch targets on mobile or hero CTAs
✗ Don't
- Don't place more than one
.btn-primaryin the same visual region - Don't use for navigation. Use
<a>tags for links. - Don't use vague labels like "Click here" or "Submit"
- Don't disable without explaining why (use
aria-describedbyor a tooltip) - Don't use
.btn-dangerfor anything other than destructive, irreversible actions