---
title: "Animated Link Icon"
description: "Two chain links for Copy link and Link buttons. On hover they pull apart and snap back."
url: https://gelatinui.com/components/animated-link-icon
markdown_url: https://gelatinui.com/components/animated-link-icon.md
access: free
install: "npx shadcn@latest add @gelatin-ui/animated-link-icon"
registry_item: https://gelatinui.com/r/animated-link-icon.json
version: "2026-11-15"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# Animated Link Icon

> Two chain links for Copy link and Link buttons. On hover they pull apart and snap back.

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

## When to use it

Best for: A Copy link or Link button: two links pull apart and snap back on hover.

- Use it in a Button that copies or adds a link.
- Use `play` to run it after a copy.

## When not to use it

- For a link that opens another site, use an [Animated External Link Icon](https://gelatinui.com/components/animated-external-link-icon.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 plays once per hover or keyboard focus of the control around it.
- `trigger="none"` with `play` plays it only from code.
- It is 24 by 24 by design. Set the size with a class.

## Anatomy

```text
AnimatedLinkIcon
```

## API reference

### AnimatedLinkIcon

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `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 |
| --- | --- | --- | --- | --- |
| AnimatedLinkIcon | `animated-link-icon` |  |  |  |

## Usage

Put it in a Button.

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-link-icon @gelatin-ui/button
```

```tsx title="copy-link.tsx"
import { AnimatedLinkIcon } from "@/components/icons/animated-link-icon";
import { Button } from "@/components/ui/button";

export function CopyLink() {
  return (
    <Button variant="outline">
      <AnimatedLinkIcon data-icon="inline-start" />
      Copy link
    </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-link-icon
```

It adds 14 registry items: 13 files, 2462 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 External Link Icon](https://gelatinui.com/components/animated-external-link-icon.md)
- [Button](https://gelatinui.com/components/button.md)
- [Input Group](https://gelatinui.com/components/input-group.md)

## Accessibility

It is a picture, so the Button needs text or an `aria-label`.

Keyboard focus plays it too.

## Motion

| Part | Motion |
| --- | --- |
| Pull | iconHover · 600ms · the links pull 1.5 apart, snap 0.4 past rest, and settle · once per hover or focus |
