> For the complete documentation index, see [llms.txt](https://xcs-plugin.gitbook.io/cursorcs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://xcs-plugin.gitbook.io/cursorcs/guides/micro-animations.md).

# micro animations

This guide explains the short preset-based UI animations available in CursorCs.

These are ideal for:

* hover feedback
* click feedback
* error feedback
* small UI motion
* menu polish

They are designed to be short and easy to configure.

## What a micro animation is

A micro animation is a preset effect that you trigger with:

```yaml
type: "preset_animation"
```

You can also use:

* `ui_animation`
* `micro_animation`

These actions are separate from the normal transform actions like `move`, `scale`, `rotate`, and `combined`.

## Where you can use them

Micro animations can be used in:

* `on_hover`
* `on_unhover`
* `on_click`
* `hotbar`

## Basic example

```yaml
play_button:
  min_x: -0.30
  max_x: 0.30
  min_y: -0.10
  max_y: 0.15
  on_hover:
    - type: "preset_animation"
      hologram: "play_button"
      preset: "pulse"
      duration: 0.15
      intensity: 0.06
```

This gives the button a small scale-style pulse when hovered.

## Click example

```yaml
confirm_button:
  min_x: -0.30
  max_x: 0.30
  min_y: -0.10
  max_y: 0.15
  on_click:
    - type: "preset_animation"
      hologram: "confirm_button"
      preset: "confirm_pop"
      duration: 0.18
      intensity: 0.07
```

## Error example

```yaml
warning_button:
  min_x: -0.30
  max_x: 0.30
  min_y: -0.10
  max_y: 0.15
  on_click:
    - type: "preset_animation"
      hologram: "warning_icon"
      preset: "error_shake"
      duration: 0.22
      intensity: 0.05
      axis: "x"
      cycles: 4
```

## Supported presets

Available presets:

* `shake`
* `nudge_left`
* `nudge_right`
* `nudge_up`
* `nudge_down`
* `pulse`
* `pop`
* `wiggle`
* `tilt`
* `bounce`
* `jelly`
* `flash_text`
* `flicker`
* `snap_in`
* `snap_out`
* `hover_float`
* `rubber_band`
* `error_shake`
* `confirm_pop`

## What the presets are good for

### Hover-friendly presets

Best for `on_hover`:

* `pulse`
* `hover_float`
* `tilt`
* `wiggle`
* `nudge_up`

### Click-friendly presets

Best for `on_click`:

* `pop`
* `confirm_pop`
* `bounce`
* `snap_in`

### Error or warning presets

Best for invalid or failed actions:

* `shake`
* `error_shake`
* `snap_out`

### More playful presets

Useful for stylized menus:

* `jelly`
* `rubber_band`
* `flicker`
* `flash_text`

## Common fields

Main fields:

* `hologram`
* `preset`
* `duration`
* `intensity`
* `axis`
* `cycles`
* `interpolation`

Example:

```yaml
on_hover:
  - type: "preset_animation"
    hologram: "play_button"
    preset: "pulse"
    duration: 0.15
    intensity: 0.06
    interpolation: "ease_out"
```

## What each field does

### `hologram`

The target hologram name.

```yaml
hologram: "play_button"
```

### `preset`

The effect to play.

```yaml
preset: "pulse"
```

### `duration`

How long the effect lasts, in seconds.

```yaml
duration: 0.15
```

### `intensity`

How strong the effect feels.

```yaml
intensity: 0.06
```

Smaller values are more subtle.

### `axis`

Used by some presets like shakes, tilts, and wiggles.

```yaml
axis: "x"
```

Supported values:

* `x`
* `y`
* `z`

### `cycles`

How many oscillations a preset should do.

```yaml
cycles: 4
```

This is mainly useful for repeated effects like shaking.

## Good starting values

For subtle UI feedback:

```yaml
duration: 0.12
intensity: 0.04
```

For clearer hover feedback:

```yaml
duration: 0.15
intensity: 0.06
```

For stronger click feedback:

```yaml
duration: 0.18
intensity: 0.08
```

For errors:

```yaml
duration: 0.22
intensity: 0.05
cycles: 4
```

## Example presets

### Pulse button on hover

```yaml
on_hover:
  - type: "preset_animation"
    hologram: "play_button"
    preset: "pulse"
    duration: 0.15
    intensity: 0.06
```

### Float upward on hover

```yaml
on_hover:
  - type: "preset_animation"
    hologram: "play_button"
    preset: "hover_float"
    duration: 0.20
    intensity: 0.04
```

### Pop on click

```yaml
on_click:
  - type: "preset_animation"
    hologram: "confirm_button"
    preset: "pop"
    duration: 0.16
    intensity: 0.08
```

### Wiggle on hover

```yaml
on_hover:
  - type: "preset_animation"
    hologram: "settings_icon"
    preset: "wiggle"
    duration: 0.18
    intensity: 0.05
    axis: "z"
```

### Nudge on scroll

```yaml
hotbar:
  enabled: true
  on_step_forward:
    - type: "preset_animation"
      hologram: "scroll_handle"
      preset: "nudge_down"
      duration: 0.10
      intensity: 0.04
```

## Combining micro animations with sounds

This is a very common pattern:

```yaml
play_button:
  min_x: -0.30
  max_x: 0.30
  min_y: -0.10
  max_y: 0.15
  on_hover:
    - type: "sound"
      sound: "minecraft:block.note_block.pling"
      volume: 0.6
      pitch: 1.1
    - type: "preset_animation"
      hologram: "play_button"
      preset: "pulse"
      duration: 0.15
      intensity: 0.06
```

## Practical recommendations

* Use `pulse` or `hover_float` for hover.
* Use `pop` or `confirm_pop` for click.
* Use `error_shake` for invalid actions.
* Keep durations short so the UI feels responsive.
* Avoid using too many strong effects on the same element.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://xcs-plugin.gitbook.io/cursorcs/guides/micro-animations.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
