---
title: "Animated Arrow Icon"
description: "An arrow for Next and Continue buttons. On hover it slides out to the end side and comes back. It points left in right-to-left pages."
url: https://gelatinui.com/components/animated-arrow-icon
markdown_url: https://gelatinui.com/components/animated-arrow-icon.md
access: free
install: "npx shadcn@latest add @gelatin-ui/animated-arrow-icon"
registry_item: https://gelatinui.com/r/animated-arrow-icon.json
version: "2026-11-13"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Animated Arrow Icon

> An arrow for Next and Continue buttons. On hover it slides out to the end side and comes back. It points left in right-to-left pages.

Page: https://gelatinui.com/components/animated-arrow-icon

## When to use it

Best for: A Next, Continue, or Back button whose arrow slides out and back on hover.

- Put it in a Button with `data-icon`.
- Use `direction` for `up`, `start`, or `end`.
- Use `play` to run it from code.

## When not to use it

- For a plain arrow, use a Phosphor icon in a [Button](https://gelatinui.com/components/button.md).

## Notes for agents

- `variant` (`stroke`, `solid`, `duotone`, `twotone`, `bulk`) and `corners` (`round`, `sharp`) pick the style. Use one style for every icon of a product.
- It flips in right to left.
- A tap plays nothing, because a touch has no hover.

## Anatomy

```text
AnimatedArrowIcon
```

## API reference

### AnimatedArrowIcon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `direction` | `"down" \| "end" \| "start" \| "up"` | "end" | `end` (default): right, left in right to left. `start`: the other way (Back). `up` (Send, Submit) and `down` never flip. |
| `variant` | `"bulk" \| "duotone" \| "solid" \| "stroke" \| "twotone"` |  | `stroke` (default): 1.5 strokes. `solid`: the body filled, inner details cut through. `duotone`: a 40% fill under the stroke. `twotone`: the details at 40%. `bulk`: the body filled at 40% with no outline, the details at full color. |
| `corners` | `"round" \| "sharp"` |  | `round` (default): round caps and joins, soft corners. `sharp`: square caps, miter joins. |
| `trigger` | `"hover" \| "none"` |  | `hover` (default) plays once per hover or keyboard focus of the control around the icon. |
| `play` | `number` |  | Plays once each time this number changes (a new notice, a saved form). |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| AnimatedArrowIcon | `animated-arrow-icon` |  |  |  |

## Usage

Put it in a Button after the text. The hover or the keyboard focus of the Button plays it once.

The sample also uses `button`, which this add does not write. One command adds them with this item:

```bash
npx shadcn@latest add @gelatin-ui/animated-arrow-icon @gelatin-ui/button
```

```tsx title="continue-button.tsx"
import { AnimatedArrowIcon } from "@/components/icons/animated-arrow-icon";
import { Button } from "@/components/ui/button";

export function ContinueButton() {
  return (
    <Button>
      Continue
      <AnimatedArrowIcon data-icon="inline-end" />
    </Button>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/animated-arrow-icon
```

It adds 14 registry items: 13 files, 2482 lines, and the npm packages `@base-ui/react`, `@mantine/hooks`, `clsx`, `motion`, `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [Animated Sparkles Icon](https://gelatinui.com/components/animated-sparkles-icon.md)
- [Button Group](https://gelatinui.com/components/button-group.md)
- [Button](https://gelatinui.com/components/button.md)

## Motion

| Part | Motion |
| --- | --- |
| Pass | morphStep · the arrow leaves to the end side and comes in from the start side |
