cel-tui
    Preparing search index...

    Function Text

    • Create a styled text leaf node.

      Text has no children and no sizing props — the parent container controls the box. Width is always parent-assigned. Height is intrinsic, computed from content, newlines (\n), and word-wrapping at the given width.

      Whitespace is always preserved. Content that exceeds the box is hard-clipped (no ellipsis).

      Parameters

      • content: string

        The text string to display.

      • props: TextProps = {}

        Styling, repeat, and wrapping props.

      Returns TextNode

      A text node for the UI tree.

      // Simple styled text
      Text("Hello", { bold: true, fgColor: "color06" })

      // Horizontal divider
      Text("─", { repeat: "fill" })

      // Word-wrapped paragraph
      Text(paragraph, { wrap: "word" })