DmButton

Updated Aug 18, 2026
DataMagik Application Designer

DmButton

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

DmButton — primary, light theme DmButton — primary, dark theme

secondary

DmButton — secondary, light theme DmButton — secondary, dark theme

danger

DmButton — danger, light theme DmButton — danger, dark theme

loading

DmButton — loading, light theme DmButton — loading, dark theme

disabled

DmButton — disabled, light theme DmButton — disabled, dark theme

Example

<DmButton>…</DmButton>

Props

NameTypeRequiredDefault
variant'primary' | 'secondary' | 'ghost' | 'danger''primary'
size'sm' | 'md' | 'lg''md'
type'button' | 'submit' | 'reset''button'
disabledbooleanfalse
loadingbooleanfalse
iconDmIconName | (string & {})undefined
trailingIconDmIconName | (string & {})undefined
blockbooleanfalse
labelstringundefined

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.

Was this page helpful?