Skip to content
Flow-UILive

Atoms

The small shapes that appear inside widget payloads everywhere.

Atoms keep payloads consistent: the same text, color and image shapes work in every widget, built in or custom. Most accept a bare string shorthand for the common case.

TextData#

json
"Hello"
 
{ "text": "Hello", "font": { "size": 16, "weight": "semibold" }, "color": "#767676",
  "alignment": "center", "max_lines": 2, "is_markdown": true }
FieldTypeDefaultDescription
textreqStringThe content. Bare string shorthand accepted.
fontFontDataSize and weight, or a theme token.
colorColorDataForeground color.
alignmentStringleadingleading, center or trailing.
max_linesIntLine limit. Omit or 0 for unlimited.
is_markdownBoolfalseParse inline Markdown before rendering.

ColorData#

FieldTypeDefaultDescription
hexString#RRGGBB or #AARRGGBB, alpha first. Bare string shorthand accepted.
dark_hexStringDark appearance override.
tokenStringDesign system token, resolved by the host theme. Wins over hex.
alphaDoubleOpacity multiplier, 0 to 1.

FontData#

FieldTypeDefaultDescription
sizeDoublePoint size.
weightStringregularregular, medium, semibold, bold, heavy, light.
tokenStringDesign system token. Wins over size and weight.

ImageData#

FieldTypeDefaultDescription
urlreqStringRemote URL. Bare string shorthand accepted.
aspect_ratioDoubleWidth over height. Reserves the shape before loading.
scale_modeStringfillfill crops to the shape; fit letterboxes.
corner_radiusNumber | CornersRounding for the image itself.
placeholder_colorColorDataShown while loading.
shimmerBoolfalseAnimate the placeholder with a shimmer sweep.
altStringAnnounced by VoiceOver. An image with no alt is treated as decorative and hidden from assistive technology, so send one for anything carrying meaning.

IconData#

FieldTypeDefaultDescription
symbolreqStringSF Symbol name. Bare string shorthand accepted.
sizeDouble17Point size.
colorColorDataTint.
actionActionFires when the icon is tapped.

ButtonData#

FieldTypeDefaultDescription
titlereqTextDataThe label.
styleStringsolidsolid, outline or plain.
bg_colorColorDataFill for solid, stroke and text tint otherwise.
corner_radiusNumber | CornersShape override.
iconIconDataLeading icon.
full_widthBoolfalseStretch to the available width.
disabledBoolfalseRenders dimmed and inert.
actionActionDispatched on tap.

TagData#

FieldTypeDefaultDescription
textreqTextDataThe pill label.
bg_colorColorDataPill fill.
border_colorColorDataOutline.
corner_radiusNumber | Corners6Pill shape.
iconIconDataLeading icon.
actionActionDispatched on tap.

Insets#

FieldTypeDefaultDescription
topDouble0Send only the sides you need.
leftDouble0
rightDouble0
bottomDouble0