Skip to content

Latest commit

 

History

History
145 lines (75 loc) · 2.68 KB

File metadata and controls

145 lines (75 loc) · 2.68 KB

tinky


tinky / TextProps

Interface: TextProps

Props for the Text component.

Extends

Properties

aria-hidden?

readonly optional aria-hidden?: boolean

Hide the element from screen readers.


aria-label?

readonly optional aria-label?: string

A label for the element for screen readers.


backgroundColor?

readonly optional backgroundColor?: LiteralUnion<ForegroundColorName, string>

Same as color, but for the background.

Inherited from

TextStyles.backgroundColor


bold?

readonly optional bold?: boolean

Make the text bold.

Inherited from

TextStyles.bold


children?

readonly optional children?: ReactNode

Children of the component.


color?

readonly optional color?: LiteralUnion<ForegroundColorName, string>

Change text color. Tinky uses Ansis under the hood, so all its functionality is supported.

Inherited from

TextStyles.color


dimColor?

readonly optional dimColor?: boolean

Dim the color (make it less bright).

Inherited from

TextStyles.dimColor


inverse?

readonly optional inverse?: boolean

Inverse background and foreground colors.

Inherited from

TextStyles.inverse


italic?

readonly optional italic?: boolean

Make the text italic.

Inherited from

TextStyles.italic


strikethrough?

readonly optional strikethrough?: boolean

Make the text crossed out with a line.

Inherited from

TextStyles.strikethrough


underline?

readonly optional underline?: boolean

Make the text underlined.

Inherited from

TextStyles.underline


wrap?

readonly optional wrap?: "end" | "truncate" | "middle" | "wrap" | "truncate-end" | "truncate-middle" | "truncate-start"

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