Skip to main content

TextProps

TextProps = object

Properties

PropertyModifierTypeDescription

backgroundColor?

readonly

LiteralUnion<ForegroundColorName, string>

Same as color, but for background.

bold?

readonly

boolean

Make the text bold.

children?

readonly

ReactNode

color?

readonly

LiteralUnion<ForegroundColorName, string>

Change text color. Ink uses chalk under the hood, so all its functionality is supported.

dimColor?

readonly

boolean

Dim the color (emit a small amount of light).

inverse?

readonly

boolean

Inverse background and foreground colors.

italic?

readonly

boolean

Make the text italic.

strikethrough?

readonly

boolean

Make the text crossed with a line.

underline?

readonly

boolean

Make the text underlined.

wrap?

readonly

Styles["textWrap"]

This property tells Ink to wrap or truncate text if its width is larger than container. If wrap is passed (by default), Ink will wrap text and split it into multiple lines. If truncate-* is passed, Ink will truncate text instead, which will result in one line of text with the rest cut off.