# ImageEditorTextAnnotation (@salmonui/editors/image-editor)

> The ImageEditorTextAnnotation interface of @salmonui/editors/image-editor: Text annotation. x, y are the top-left corner of the first line.

Canonical: https://salmonui.dev/docs/reference/editors/image-editor/ImageEditorTextAnnotation

```ts
import type { ImageEditorTextAnnotation } from '@salmonui/editors/image-editor';
```

Entry index: https://salmonui.dev/docs/reference/editors/image-editor (Markdown with every symbol of the entry: https://salmonui.dev/docs/reference/editors/image-editor.md).

## Reference

Kind: interface

```ts
interface ImageEditorTextAnnotation extends AnnotationCommon {
    readonly kind: 'text';
    readonly x: number;
    readonly y: number;
    readonly text: string;
    readonly fontFamily?: string | undefined;
    readonly fontSize?: number | undefined;
    readonly color?: string | undefined;
    readonly bold?: boolean | undefined;
    readonly italic?: boolean | undefined;
}
```

Text annotation. `x`, `y` are the top-left corner of the first line.

Members (12):

| Name | Signature | Flags | Description |
| --- | --- | --- | --- |
| `kind` | `readonly kind: 'text';` |  |  |
| `x` | `readonly x: number;` |  |  |
| `y` | `readonly y: number;` |  |  |
| `text` | `readonly text: string;` |  |  |
| `fontFamily` | `readonly fontFamily?: string \| undefined;` | optional | Default `'sans-serif'`. |
| `fontSize` | `readonly fontSize?: number \| undefined;` | optional | In oriented-image pixels. Default 32. |
| `color` | `readonly color?: string \| undefined;` | optional | Default `'#e5484d'`. |
| `bold` | `readonly bold?: boolean \| undefined;` | optional |  |
| `italic` | `readonly italic?: boolean \| undefined;` | optional |  |
| `id` | `id: string;` | inherited | Stable id; selection, history and callbacks use it. |
| `rotation` | `rotation?: number;` | optional, inherited | Clockwise degrees around the annotation's center. Default 0. |
| `opacity` | `opacity?: number;` | optional, inherited | 0 to 1. Default 1. |
