button
The native element, styled directly. Variants and sizes are data attributes; behavior remains native.
Example
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
| Name | Type | Default | Description |
|---|---|---|---|
type | HTML button type | submit | Use button, submit, or reset according to the native button's action. |
disabled | boolean | false | Uses the native disabled state and Mica's reduced-opacity treatment. |
Mica extensions
| Name | Type | Default | Description |
|---|---|---|---|
data-variant | primary | ghost | danger | default | Selects a presentation variant. |
data-size | small | large | default | Selects a compact or large control size. |
class="btn" | class | — | Applies 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.