position, which makes it explicit and absolute.
Text
string
required
The text to render.
StyleProperties
Color, font family, size, weight, alignment, padding, and other style fields.
string
A name a theme can target to apply default styles.
number
A fixed width for the text box. Without one, the text takes its intrinsic width.
{ x: number; y: number }
Absolute coordinates. With a position the element is explicit and leaves the flow.
boolean
Overrides the document level markdown setting for this one element.
number
Draw order among overlapping elements within the same parent.
Rectangles
style.background_color or from a shape_style with
fill_color and stroke_color. Use stroke_width for the border thickness and
border_radius for rounded corners.
Images
name references an image registered with load_image_sync. Register the file first,
then reference it by name.
Text, rectangles, and images together
A
position makes an element explicit and absolute on the page. Without one it joins the
vertical flow.Overlay children and z index
Any element can own overlay children built withelement.text, element.rect,
element.image, or element.create_container. Children are positioned relative to the
parent’s top left corner and render on top of it, sorted by z index.
Related pages
Layout
Arrange elements with flow and flex containers.
Themes
Style elements by type and classname.