Skip to content

Content components ​

Text, images, code, badges and avatars.

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.

text ​

A paragraph or heading that wraps to the available width. Use {expressions} to show state.

PropTypeDescription
"text"text, requiredThe words to show. May include {expressions}.
styledisplay / title / lead / body / captiondisplay, title, lead, body or caption.
weightregular / semibold / boldregular, semibold or bold. Titles default to semibold.
tonedefault / muted / accent / good / warn / badColor role: default, muted, accent, good, warn or bad.
alignleft / center / rightleft, center or right.
strikebooleanDraw a line through the text, e.g. for an old price.
iconstringAn icon before the text, by name from icon's list, e.g. icon=check-circle.
richbooleantrue reads inline formatting in the words: bold, italic, code and links words. A link is pressed by the person and sent to you as emit:link with its address; SayShape never opens it. One paragraph per text line.
sayshape
state guests=2 nights=3
text "Weekend in Yosemite" style=title
text "{guests} guests, {nights} nights" tone=muted
text "$160" tone=muted strike=true
text "Payment received" icon=check-circle tone=good
text "**Free** cancellation until *2 days* before; see [the terms](https://northwind.example/terms)." rich=true
Rendered by the SayShape engineOpen in playground

Try text interactively →

image ​

A picture, such as a product photo. The quoted text says what it shows, and is displayed if the image can't load.

PropTypeDescription
"text"text, requiredWhat the image shows, e.g. Blue trail runners from the side.
srcstring, requiredThe image URL. Only the app's own site and hosts it allows will load.
ratio16:9 / 4:3 / 3:2 / 1:1 / 2:3 / 3:4Width to height: 16:9, 4:3, 3:2, 1:1, 2:3 or 3:4. The space is kept while the image loads.
fitcover / containcover fills the space and crops the edges; contain shows the whole image.
sayshape
image "Ridgeline trail runners, side view" src="/images/ridgeline.jpg" ratio=4:3

Try image interactively →

code ​

A short piece of code or a command, in a monospaced font on a tinted block.

PropTypeDescription
"text"text, requiredThe code. Long lines wrap.
sayshape
code "npm install sayshape"
Rendered by the SayShape engineOpen in playground

Try code interactively →

badge ​

A small rounded label for a status or a short tag, like Shipped or New.

PropTypeDescription
"text"text, requiredThe label, one or two words.
toneaccent / good / warn / bad / mutedColor role: accent, good, warn, bad or muted.
sayshape
badge "Shipped" tone=good
Rendered by the SayShape engineOpen in playground

Try badge interactively →

avatar ​

A person's initials in a circle, with their name and an optional detail line beside it.

PropTypeDescription
"text"text, requiredThe person's name. The initials come from it.
detailstringA second line under the name, like a role.
sizesm / md / lgsm, md or lg.
toneaccent / good / warn / bad / mutedCircle color role: accent, good, warn, bad or muted.
namebooleanShow the name beside the circle (default true).
sayshape
avatar "Ada Lovelace" detail="Trip organizer"
Rendered by the SayShape engineOpen in playground

Try avatar interactively →

callout ​

The one thing to notice in an answer: a key finding, a warning or a next step.

PropTypeDescription
"text"text, requiredThe takeaway, in one short sentence. May include {expressions}. Long text wraps.
detailstringAn optional second line in muted text, e.g. what the finding is based on.
toneinfo / accent / good / warn / badinfo (default, the accent color) for a finding, good for good news, warn for something to watch, bad for a problem. accent is the same as info.
iconbooleanShow a small icon matching the tone: i, a tick, ! or ×.
sayshape
callout "Rock is 47% of revenue" detail="Up from 41% last year" icon=true
Rendered by the SayShape engineOpen in playground

Try callout interactively →

icon ​

A small symbol on its own, like a status mark or a weather sign. To start a line of text or a list row with one, use icon= on text or list-item instead.

PropTypeDescription
namestring, requiredWhich icon: check, check-circle, x, x-circle, warning, info, help, clock, arrow-up, arrow-down, arrow-left, arrow-right, trend-up, trend-down, plus, minus, refresh, sun, moon, cloud, rain, snow, storm, wind, thermometer, droplet, pin, globe, plane, car, truck, home, building, dollar, card, cart, package, bar-chart, pie-chart, percent, tag, briefcase, file, target, bolt, idea, lock, user, users, calendar, mail, phone, chat, star, heart, spade, club, diamond, bell, search, filter, download, copy, share, link, sliders.
tonedefault / muted / accent / good / warn / badColor role: default, muted, accent, good, warn or bad.
sizesm / md / lgsm, md or lg.
labelstringWhat the icon means, read by screen readers, when nothing beside it says so, e.g. label="Sunny". Leave it out for decoration.
sayshape
icon name=sun tone=warn size=lg
icon name=check-circle tone=good
Rendered by the SayShape engineOpen in playground

Try icon interactively →

tile ​

A small fixed-size face with a value, an optional icon and a detail line, for playing cards, seats, dice, keys or lottery numbers. Several in a row keep their size and wrap.

PropTypeDescription
"text"textThe value on its face, e.g. A, 10 or B4. Keep it short.
iconstringAn icon on its face, by name from icon's list, e.g. icon=club. The suits are club, spade, heart and diamond.
shapecard / squarecard (portrait, like a playing card) or square (a seat, a key, a die).
sizesm / md / lgsm, md or lg.
detailstringA small line under the value, e.g. a price or an atomic weight. Keep it to a few characters at size=sm.
tonedefault / muted / accent / good / warn / badColor of the value and icon: default, muted, accent, good, warn or bad (red suits use bad).
variantraised / outlineraised (a lifted face) or outline.
selectedconditionExpression; when true the tile is marked as chosen, e.g. selected={s.picked}.
disabledconditionExpression; when true it's greyed out and can't be pressed, e.g. a seat that's taken.
onactionActions to run when pressed, e.g. emit:changed. Separate several with ;
labelstringWhat screen readers and Copy text say for it, e.g. label="Seat B4". Default: its value (with its suit, as in Q of hearts) and detail.
sayshape
row gap=8
  tile "4" icon=club label="4 of clubs"
  tile "Q" icon=heart tone=bad label="Queen of hearts"
  tile "A" icon=spade label="Ace of spades"
  tile "B4" shape=square detail="$14" selected=true on=emit:seat
Rendered by the SayShape engineOpen in playground

Try tile interactively →

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