Skip to content

Feedback components ​

Progress, loading placeholders and empty states.

Generated from the component definitions in src/components, the same source the parser validates against and the model guide is built from. Every element also accepts if=, tip=. Each example below is rendered live by the SayShape engine.

progress ​

A horizontal bar showing how far a value is toward a maximum.

PropTypeDescription
valuenumber, requiredCurrent amount, usually an {expression}.
maxnumberThe full amount (default 100).
labelstringOptional caption above the bar.
tonedefault / muted / accent / good / warn / badColor role: default, muted, accent, good, warn or bad.
sayshape
state done=3
progress value={done} max=5 label="{done} of 5 steps"
Rendered by the SayShape engineOpen in playground

Try progress interactively →

skeleton ​

A grey placeholder shown while content loads: lines of text, a block or a circle.

PropTypeDescription
shapetext / block / circletext (lines), block or circle.
linesnumberHow many lines, for shape=text (default 3).
heightnumberHeight of a block, or diameter of a circle (default 120 and 48).
sayshape
skeleton lines=2
skeleton shape=block height=80
Rendered by the SayShape engineOpen in playground

Try skeleton interactively →

empty ​

A friendly message for when there is nothing to show, with an optional button to move on.

PropTypeDescription
"text"text, requiredThe message, e.g. No orders yet.
detailstringA line explaining what to do next.
actionstringLabel for a button under the message.
onactionActions to run when the button is pressed, e.g. emit:changed. Separate several with ;
sayshape
empty "No results" detail="Try a wider price range." action="Clear filters" on=emit:clear_filters
Rendered by the SayShape engineOpen in playground

Try empty interactively →

dialog ​

A panel over the screen for something that needs an answer or attention first: confirm a delete, a short form, one item's details. It opens when bind= is true, so start that state false and open it from a button, unless it should greet people as the screen opens; its × button, Escape and a press outside it close it.

PropTypeDescription
"text"textThe title at its top, e.g. Delete order?
bindstate, requiredA true/false state: true shows it, e.g. bind=confirm. Open it with on=set:confirm:true; close it from a button inside with on=set:confirm:false.
sizesm / md / lgHow wide it gets: sm (a question), md (a short form) or lg (details).
onactionActions to run when it's closed by its × button, Escape or a press outside it, e.g. emit:changed. Separate several with ;

Children: any elements.

sayshape
state confirm=true
button "Delete order" variant=danger on=set:confirm:true
dialog "Delete order NW-2041?" bind=confirm size=sm
  text "The order and its invoice are removed. This can't be undone." tone=muted
  row
    button "Cancel" variant=secondary on=set:confirm:false
    button "Delete" variant=danger on="emit:delete;set:confirm:false"
Rendered by the SayShape engineOpen in playground

Try dialog interactively →

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