DmButton
Updated Aug 18, 2026
DataMagik Application DesignerDmButton
Four variants, three sizes, a loading state and an icon-only mode.
When not to use it. For a link that navigates, use an anchor — a button that changes the page cannot be opened in a new tab.
States
primary
secondary
danger
loading
disabled
Example
<DmButton>…</DmButton>
Props
| Name | Type | Required | Default |
|---|---|---|---|
variant | 'primary' | 'secondary' | 'ghost' | 'danger' | 'primary' | |
size | 'sm' | 'md' | 'lg' | 'md' | |
type | 'button' | 'submit' | 'reset' | 'button' | |
disabled | boolean | false | |
loading | boolean | false | |
icon | DmIconName | (string & {}) | undefined | |
trailingIcon | DmIconName | (string & {}) | undefined | |
block | boolean | false | |
label | string | undefined |
Events
click
Slots
default
Worth knowing
A `loading` button is disabled while it spins. That is deliberate: the failure it prevents is a double submit, which on a script-running button means two runs.