# text.apply_preset

> Animates one edge of a visual item with a named preset.

Source: https://alexgalhardo.github.io/vukem-video/pt-br/docs/reference/commands/text.apply_preset/

Writes the keyframes (or, for slide_left and slide_right, the transition) of the preset on the in or out edge, 0.4 seconds long unless duration is given. Keyframes of the same properties inside that edge are replaced; the rest of the animation is kept.

## Arguments

| Argument | Type | Required | Description |
| --- | --- | --- | --- |
| `duration` | `string` | no | A length, at most the item's duration. Default "0.4s". |
| `edge` | `in`, `out` | yes | in or out. |
| `item_id` | `string` | yes | A clip, text, caption or shape item. |
| `preset` | `fade_up`, `fade_down`, `pop`, `zoom_in`, `slide_left`, `slide_right` | yes | The animation. |

## Example

As one operation of an `edit` batch (the `edit` tool of MCP, `vukem-video edit --ops`, or `POST /api/v1/projects/{id}/edit`):

```json
{
  "op": "text.apply_preset",
  "args": {
    "edge": "in",
    "item_id": "itm_s6t7v8w9x0",
    "preset": "fade_up"
  }
}
```

## Errors

[`E_VALIDATION`](/docs/reference/error-codes#e_validation), [`E_INVALID_TIME`](/docs/reference/error-codes#e_invalid_time), [`E_NOT_FOUND`](/docs/reference/error-codes#e_not_found), [`E_TYPE_MISMATCH`](/docs/reference/error-codes#e_type_mismatch), [`E_INVALID_STATE`](/docs/reference/error-codes#e_invalid_state), [`E_LIMIT`](/docs/reference/error-codes#e_limit)

## Scope and phase

Scope `edit`, phase `alpha`. Run `vukem-video command:help text.apply_preset` for the same description from the binary.
