tuil
ReferencePackages@mwillbanks/tuil-inkAPI

TerminalImageProps

interface exported by @mwillbanks/tuil-ink.

View rawEdit

interface

Public interface exported by @mwillbanks/tuil-ink.

export interface TerminalImageProps
  extends Omit<TextProps, "children" | "width" | "height"> {
  readonly source: TerminalImageSource;
  readonly alt: string;
  readonly columns?: number;
  readonly id?: string;
  readonly testId?: string;
}

Members

MemberTypeRequiredDescriptionRelated types
sourceTerminalImageSourceYesThe source member uses the TerminalImageSource contract.TerminalImageSource
altstringYesThe alt member uses the string contract.
columnsnumber | undefinedNoThe columns member uses the number | undefined contract.
idstring | undefinedNoThe id member uses the string | undefined contract.
testIdstring | undefinedNoThe testId member uses the string | undefined contract.
wrap"wrap" | "hard" | "truncate-end" | "truncate" | "truncate-middle" | "truncate-start" | undefinedNoThis property tells Ink to wrap or truncate text if its width is larger than the container. If wrap is passed (the default), Ink will wrap text and split it into multiple lines. If hard is passed, Ink will fill each line to the full column width, breaking words as necessary. If truncate-* is passed, Ink will truncate text instead, resulting in one line of text with the rest cut off.
backgroundColorLiteralUnion<keyof import("../../../../../../../packages/ink/node_modules/chalk/source/vendor/ansi-styles/index.js").ForegroundColor, string> | undefinedNoSame as color, but for the background.
aria-labelstring | undefinedNoA label for the element for screen readers.
aria-hiddenboolean | undefinedNoHide the element from screen readers.
boldboolean | undefinedNoMake the text bold.
underlineboolean | undefinedNoMake the text underlined.
colorLiteralUnion<keyof import("../../../../../../../packages/ink/node_modules/chalk/source/vendor/ansi-styles/index.js").ForegroundColor, string> | undefinedNoChange text color. Ink uses Chalk under the hood, so all its functionality is supported.
dimColorboolean | undefinedNoDim the color (make it less bright).
italicboolean | undefinedNoMake the text italic.
strikethroughboolean | undefinedNoMake the text crossed out with a line.
inverseboolean | undefinedNoInverse background and foreground colors.

Parameters

This declaration has no public members.

Returns

This declaration does not return a value.

Throws

No thrown errors are documented for this declaration.

Source

View the secondary source reference

Package

@mwillbanks/tuil-ink

On this page