Button

Solora's button component ships with six semantic variants, four sizes, a disabled state, and beautiful dark mode support — all driven by CSS variables.

Variants

Choose the variant that matches the action's importance and context.

<button class="btn btn-primary btn-md">Primary</button>
<button class="btn btn-secondary btn-md">Secondary</button>
<button class="btn btn-success btn-md">Success</button>
<button class="btn btn-warning btn-md">Warning</button>
<button class="btn btn-danger btn-md">Danger</button>
<button class="btn btn-glass btn-md">Glass</button>

Sizes

Four sizes cover every use case from inline actions to large CTAs.

<button class="btn btn-primary btn-sm">Small</button>
<button class="btn btn-primary btn-md">Medium</button>
<button class="btn btn-primary btn-lg">Large</button>
<button class="btn btn-primary btn-xl">X-Large</button>

Disabled State

Add class disabled (or the HTML disabled attribute) to indicate an unavailable action.

<button class="btn btn-primary btn-md disabled">Disabled</button>
<!-- or using native disabled attribute -->
<button class="btn btn-primary btn-md" disabled>Disabled</button>

Glass Button

The btn-glass variant uses backdrop blur for a frosted-glass effect. It adapts cleanly to any background — particularly striking on image or gradient backgrounds.

⚠️ Performance note backdrop-filter can be GPU-intensive. Avoid using many glass buttons simultaneously on pages with complex backgrounds.

API

ClassTypeDescription
btnRequiredBase button styles (always include)
btn-primaryVariantBlue brand action
btn-secondaryVariantSubtle outlined style
btn-successVariantPositive action
btn-warningVariantCaution action
btn-dangerVariantDestructive action
btn-glassVariantFrosted glass effect
btn-smSizeSmall (0.9375rem)
btn-mdSizeMedium (1rem) — default
btn-lgSizeLarge (1.0625rem)
btn-xlSizeExtra large (1.3125rem)
disabledStateReduces opacity, disables pointer events

Accessibility

♿ Best practices Always use <button> elements for actions (not <div> or <a>). For icon-only buttons, add aria-label="Description". Use the native disabled attribute instead of the CSS class when the button is truly non-interactive, so assistive technologies can detect it.