Skip to content
Elements / Content

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.

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props
tone
size

Props

namestringWhich 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.required
tonedefault · muted · accent · good · warn · badColor role: default, muted, accent, good, warn or bad.default
sizesm · md · lgsm, md or lg.md
labelstringWhat the icon means, read by screen readers, when nothing beside it says so, e.g. label="Sunny". Leave it out for decoration.—
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