run : Config(state) -> Program(state)
Construct the program value required by the platform's main module.
:= []
The whole application-facing platform under one import. Build a tree with
the element constructors and their property records, adjust an element
with the modifiers on Elem, and answer events with the constructors on
Action: Action.none(), Action.update, Action.delegate, or Action.task.
run : Config(state) -> Program(state)
Construct the program value required by the platform's main module.
A colour for each appearance, 0xRRGGBB both: light on a light
window and dark on a dark one. The host chooses when it paints, so the
window follows the system, or Appearance.prefer!, without rendering the
application again.
Construct a fixed per-side inset.
Construct a fixed pixel length.
Display literal text. It inherits colour and size from its container.
Display a key chord, declared as a shortcut declares it (secondary-k),
in the spelling of the platform it runs on: ⌘K on macOS and ctrl-K
elsewhere, so a hint always names the keys a person presses.
styled_text : TextProps -> Elem(a)
Display text in its own colour, size, weight, and face.
span : SpanProps -> TextSpan
One styled run of rich text: its own colour, ground, weight, underline, or monospace face.
rich_text : RichTextProps -> Elem(a)
Display several styled runs as one text element, which lays out and wraps as one string and is located by the whole of it.
button : ButtonProps(a) -> Elem(a)
Display a controlled button. caption is its visible text and label its semantic locator.
checkbox : CheckboxProps(a) -> Elem(a)
Display a controlled checkbox.
text_input : TextInputProps(a) -> Elem(a)
Display a controlled single-line text editor.
textarea : TextareaProps(a) -> Elem(a)
Display a controlled multiline text editor.
image : ImageProps -> Elem(a)
Render encoded image bytes.
canvas : CanvasProps(a) -> Elem(a)
Paint keyed vector primitives and receive pointer gestures.
Lay out children horizontally in order.
Lay out children vertically in order.
Group children in a labelled, bordered vertical surface.
Present one modal surface.
split : SplitProps(a), Elem(a), Elem(a) -> Elem(a)
Lay two panes out beside or above each other, with a divider a person drags or moves with the arrow keys to resize them.
tabs : TabsProps(a) -> Elem(a)
A strip of selectable tabs, each with an optional close button.
drop_target : DropTargetProps(a), List(Elem(a)) -> Elem(a)
Lay children out in a column that accepts files dropped on it, each granted to the application as a read-only file of an accepted type.
Annotate an anchor with a non-modal surface that opens on hover and focus.
Annotate an element with a short text tooltip, named by that text.
Answer key chords anywhere in the window while an element is mounted.
focus_shortcuts : Elem(a), List(Shortcut(a)) -> Elem(a)
Answer key chords only while keyboard focus is inside an element.
request_focus : Elem(a), U64 -> Elem(a)
Focus the first enabled control inside an element once for each new serial.
scroll : ScrollProps(a) -> Elem(a)
Constrain content to the available space and allow scrolling.
virtual_list : VirtualListProps(a) -> Elem(a)
Present fixed-height rows, materializing only the visible range.
virtual_rows : VirtualRowsProps(a) -> Elem(a)
Present count fixed-height rows, producing each on demand for the viewport.
translate : (child -> Elem(child)), (parent -> child), (parent, child -> parent) -> Elem(parent)
Embed a renderer over a smaller part of parent state.
translate_with : (child -> Elem(child)), TranslateConfig(parent, child) -> Elem(parent)
Embed a keyed renderer whose lifetime survives parent renders.
try_translate : (child -> Elem(child)), TryTranslateConfig(parent, child) -> Elem(parent)
Embed a removable child through fallible adapters.
keyed_col : (item -> Elem(item)), ColProps, KeyedColConfig(parent, item) -> Elem(parent)
Adapt a persistent keyed sequence into a native column.
rectangle : CanvasRectangle -> CanvasPrimitive
A filled, optionally stroked and rounded rectangle on a canvas.
ellipse : CanvasEllipse -> CanvasPrimitive
A filled, optionally stroked ellipse on a canvas.
line : CanvasLine -> CanvasPrimitive
A stroked line on a canvas.
canvas_text : CanvasText -> CanvasPrimitive
A single line of text on a canvas, aligned within a box.
Elem : Elem(a)
A declarative UI tree whose event handlers transition application state.
Action : Action(a)
What an event handler asks the platform to do next.
Program : Program(state)
The value an application's main provides.
Access : Access
The capability from which an application acquires host resources.
Key : Key
Index : Index(a)
KeyedSeq : KeyedSeq(value)
Style : Style
Align : Align
Color : Color
FontFace : FontFace
Inset : Inset
Justify : Justify
Length : Length
TextOverflow : TextOverflow
Overflow : Overflow
Appearance : Appearance
Assets : Assets
Audio : Audio
Clipboard : Clipboard
Device : Device
Files : Files
Http : Http
ImageData : ImageData
Process : Process
Sqlite : Sqlite
SystemMonitor : SystemMonitor
Tcp : Tcp
Timer : Timer
Event : Event
TranslateConfig : TranslateConfig(parent, child)
TryTranslateConfig : TryTranslateConfig(parent, child)
KeyedColConfig : KeyedColConfig(parent, item)
VirtualListItem : VirtualListItem(a)
RowAlign : RowAlign
ScrollRequest : ScrollRequest
ScrollAxis : ScrollAxis
Placement : Placement
SplitAxis : SplitAxis
SplitSide : SplitSide
TabItem : TabItem
Shortcut : Shortcut(a)
ImageFormat : ImageFormat
ImageFit : ImageFit
CanvasEllipse : CanvasEllipse
CanvasLine : CanvasLine
CanvasRectangle : CanvasRectangle
CanvasText : CanvasText
CanvasTextAlign : CanvasTextAlign
CanvasPrimitive : CanvasPrimitive
TextSpan : TextSpan