Skip to content
Elements / Input

button

A pressable button that runs actions. Use emit: to tell the app what the user chose.

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props
variant

Props

"text"textThe button label.required
onactionWhat happens when pressed, e.g. inc:count, set:done:true, emit:book. Separate several with ;—
variantprimary · secondary · dangerprimary (filled), secondary (outlined) or danger.primary
disabledconditionExpression; when true the button is greyed out and can't be pressed.—
ifconditionShow only when this expression is true, e.g. if=done or if={count>0}. Every element takes it.—
tipstringA short explanation shown on hover, keyboard focus or a tap, e.g. tip="Orders not yet shipped": for a term or a number some people won't know, instead of more words on screen. It makes the element a Tab stop if it isn't one. Every element takes it.—

SayShape v0.1 is an early prototype under the MIT License. Status · GitHub