TextBox

PropertyDefaultMeaning
widthContent-sized"fill" occupies available width; lengths set an explicit width
children—Text, inline content, or one existing layout element
paddingem(0.6)Length or Box padding shorthand
border-widthpx(0)Border thickness inside the frame
border-colorResolved colorBorder paint
backgroundnoneBox background
border-radius0Scalar, { x, y } / [x, y] pair, or side/corner object
align{ x: "fill" }Fill the child's automatic width; start vertically
text-justify"start"start, center, end, or a fraction from 0 to 1 for lines inside generated text
clipfalseClip content inside the rounded border

TextBox accepts string/Span/Element children, with 0.6em padding. Other props follow Box. TextFrame adds a 1px border. Text reflows at the allocated width while font size remains fixed; existing Elements are retained. text-* props configure generated Text children through prefix piping, for example text-justify="center" or text-wrap={false}.

The panel measures its content, including padding and border. Use width="fill" when it should occupy the offered width. Within an established content area, its child's unspecified width fills by default. Explicit child widths and min/max limits are respected; align-self="start" keeps a child compact. Height remains content-sized.

Use TextCol for multiple block children. A single element inside JSX fragments or conditional children is preserved. Mixed strings, Spans, and formulas form one paragraph. Wrap several elements without prose in Text to request inline layout explicitly. An explicit align replaces the default. See Sizing.