mica

Example

Link as button

Basic usage

<button data-variant="primary">Submit</button>
<a class="btn" href="/docs">A link dressed as a button</a>

API

Button behavior and standard attributes come from native HTML. Mica adds only presentation through the attributes and class listed below.

Native HTML attributes

NameTypeDefaultDescription
typeHTML button typesubmitUse button, submit, or reset according to the native button's action.
disabledbooleanfalseUses the native disabled state and Mica's reduced-opacity treatment.

Mica extensions

NameTypeDefaultDescription
data-variantprimary | ghost | dangerdefaultSelects a presentation variant.
data-sizesmall | largedefaultSelects a compact or large control size.
class="btn"classApplies button presentation to a link while preserving native link behavior.

Notes

Data attributes keep extension markup valid on native HTML elements. Ghost has deliberately zero rest affordance — use it in toolbars and icon rows, not for the lone action on a page. Disabled is the same fill at reduced opacity.

← coverbadge →