Primitives
Sk.Text

Sk.Text

Multi-line text block with a shorter last line.

When generated by analyze, height is set to the element's computed font-size and lineHeight to the computed line-height, so each bar looks visually natural while the element takes up exactly the same space as real text.

Live preview

<Sk.Text />
<Sk.Text lines={3} />
<Sk.Text lines={3} lastLineWidth="40%" />
<Sk.Text height="14px" lineHeight="20px" width="200px" />

Usage

<Sk.Text />                                    // single line, full width
<Sk.Text lines={3} />                          // 3 lines
<Sk.Text lines={3} lastLineWidth="40%" />
<Sk.Text width="80%" />
<Sk.Text height="14px" lineHeight="20px" />    // precise sizing (auto-generated)
<Sk.Text lines={3} height="14px" gap="6px" />  // multi-line with exact gap

Props

PropTypeDefaultDescription
linesnumber1Number of text lines
widthstring'100%'Width of all lines except last
lastLineWidthstring'60%'Width of the last line (multi-line only)
heightstring'1em'Height of each bar (set to font-size by analyzer)
lineHeightstringOuter container height for single-line (set to computed line-height by analyzer for layout stability)
gapstring'0.4em'Gap between bars (multi-line only; set by analyzer so total height matches bounding box)
classNamestringApplied to outer wrapper; use for margin/spacing classes