# TerminalImageProps

Source: /tuil/docs/reference/packages/ink/api/terminal-image-props
Locale: en

interface exported by @mwillbanks/tuil-ink.



{/* Generated by tooling/docs/generate-reference.ts. */}

## interface [#interface]

Public interface exported by `@mwillbanks/tuil-ink`.

```ts
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 [#members]

| Member            | Type                                                                                                                                                         | Required | Description                                                                                                                                                                                                                                                                                                                                                                                             | Related types                                                                   |
| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
| `source`          | `TerminalImageSource`                                                                                                                                        | Yes      | The `source` member uses the `TerminalImageSource` contract.                                                                                                                                                                                                                                                                                                                                            | [`TerminalImageSource`](/tuil/docs/reference/packages/ink/api/terminal-image-source) |
| `alt`             | `string`                                                                                                                                                     | Yes      | The `alt` member uses the `string` contract.                                                                                                                                                                                                                                                                                                                                                            | —                                                                               |
| `columns`         | `number \| undefined`                                                                                                                                        | No       | The `columns` member uses the `number \| undefined` contract.                                                                                                                                                                                                                                                                                                                                           | —                                                                               |
| `id`              | `string \| undefined`                                                                                                                                        | No       | The `id` member uses the `string \| undefined` contract.                                                                                                                                                                                                                                                                                                                                                | —                                                                               |
| `testId`          | `string \| undefined`                                                                                                                                        | No       | The `testId` member uses the `string \| undefined` contract.                                                                                                                                                                                                                                                                                                                                            | —                                                                               |
| `wrap`            | `"wrap" \| "hard" \| "truncate-end" \| "truncate" \| "truncate-middle" \| "truncate-start" \| undefined`                                                     | No       | This 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. | —                                                                               |
| `backgroundColor` | `LiteralUnion<keyof import("../../../../../../../packages/ink/node_modules/chalk/source/vendor/ansi-styles/index.js").ForegroundColor, string> \| undefined` | No       | Same as `color`, but for the background.                                                                                                                                                                                                                                                                                                                                                                | —                                                                               |
| `aria-label`      | `string \| undefined`                                                                                                                                        | No       | A label for the element for screen readers.                                                                                                                                                                                                                                                                                                                                                             | —                                                                               |
| `aria-hidden`     | `boolean \| undefined`                                                                                                                                       | No       | Hide the element from screen readers.                                                                                                                                                                                                                                                                                                                                                                   | —                                                                               |
| `bold`            | `boolean \| undefined`                                                                                                                                       | No       | Make the text bold.                                                                                                                                                                                                                                                                                                                                                                                     | —                                                                               |
| `underline`       | `boolean \| undefined`                                                                                                                                       | No       | Make the text underlined.                                                                                                                                                                                                                                                                                                                                                                               | —                                                                               |
| `color`           | `LiteralUnion<keyof import("../../../../../../../packages/ink/node_modules/chalk/source/vendor/ansi-styles/index.js").ForegroundColor, string> \| undefined` | No       | Change text color. Ink uses Chalk under the hood, so all its functionality is supported.                                                                                                                                                                                                                                                                                                                | —                                                                               |
| `dimColor`        | `boolean \| undefined`                                                                                                                                       | No       | Dim the color (make it less bright).                                                                                                                                                                                                                                                                                                                                                                    | —                                                                               |
| `italic`          | `boolean \| undefined`                                                                                                                                       | No       | Make the text italic.                                                                                                                                                                                                                                                                                                                                                                                   | —                                                                               |
| `strikethrough`   | `boolean \| undefined`                                                                                                                                       | No       | Make the text crossed out with a line.                                                                                                                                                                                                                                                                                                                                                                  | —                                                                               |
| `inverse`         | `boolean \| undefined`                                                                                                                                       | No       | Inverse background and foreground colors.                                                                                                                                                                                                                                                                                                                                                               | —                                                                               |

## Parameters [#parameters]

This declaration has no public members.

## Returns [#returns]

This declaration does not return a value.

## Throws [#throws]

No thrown errors are documented for this declaration.

## Related types [#related-types]

* [`TerminalImageSource`](/tuil/docs/reference/packages/ink/api/terminal-image-source)
* [`TextProps`](/tuil/docs/reference/packages/ink/api/text-props)

## Source [#source]

[View the secondary source reference](https://github.com/mwillbanks/tuil/blob/main/packages/ink/src/image.tsx)

## Package [#package]

[@mwillbanks/tuil-ink](/tuil/docs/reference/packages/ink)
