Skip to content
Elements / Content

image

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

Spec · edit me

No problems. The parser accepted every line.

Result · try itOpen in playground

This example loads a photo from your app's own site, so it isn't drawn here. In your app, images load from your origin and the hosts you allow.

Tweak the props
ratio
fit

Props

"text"textWhat the image shows, e.g. Blue trail runners from the side.required
srcstringThe image URL. Only the app's own site and hosts it allows will load.required
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.16:9
fitcover · containcover fills the space and crops the edges; contain shows the whole image.cover
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