Skip to content
Elements / Data

compare

Two to four options side by side with one row per attribute, marking the best value in each row: plans, products or choices to weigh up. Use compare-row children.

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground
Tweak the props

Props

"text"textA title above the comparison.optional
itemsexpressionThe options, a list of records, e.g. items=plans. Two to four.required
namenameThe field holding each option's name, shown at the top of its column (default name).name
pickstringThe name of the option to recommend: its column is highlighted and marked Recommended.—
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.—

Children: compare-row

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