---
title: "Follow Button"
description: "Follow in three beats: the pill closes into a circle with a spinner, a check draws itself in, then it opens into Following."
category: "Micro Interactions"
publishedAt: "2026-11-16"
updatedAt: "2026-11-25"
documentation: "https://beui.dev/micro-interactions/follow-button"
markdown: "https://beui.dev/micro-interactions/follow-button.md"
license: "MIT"
---

# Follow Button

> Follow in three beats: the pill closes into a circle with a spinner, a check draws itself in, then it opens into Following.

## Install

```bash
npx shadcn@latest add @beui/follow-button
```

## Dependencies

- `clsx`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { FollowButton } from "@/components/motion/follow-button";

export function FollowButtonUsage() {
  return <FollowButton name="Maya Chen" />;
}
```

## API Reference

### FollowButton

| Prop | Type | Default | Required | Description |
| --- | --- | --- | --- | --- |
| `following` | `boolean` | — | No | Whether the user is following, for controlled use. |
| `defaultFollowing` | `boolean` | `false` | No | Whether it starts in the following state when uncontrolled. Default: false |
| `onFollowingChange` | `((following: boolean) => void)` | — | No | Called with the new state when the button is clicked. |
| `name` | `string` | — | No | Who is being followed, for the accessible name ("Follow {name}"). |
| `labels` | `Partial<{ follow: string; following: string; unfollow: string; followName: string; }>` | — | No | Override any built-in string, e.g. for translation. |
| `sound` | `boolean` | `false` | No | Play a crisp select on follow, lower on unfollow. Off by default; a `SoundProvider` can mute it app-wide. |
| `className` | `string` | — | No | Classes merged onto the root element. |

## About Follow Button

Follow Button is a React toggle built with Framer Motion. Following plays in three beats: the label folds away and the pill closes into a circle with a spinner, the spinner gives way to a check that draws itself, then the circle opens into an outlined Following pill. The button reports aria-busy while the spinner shows. On devices that hover, pointing at Following turns the check into an × and previews Unfollow in the destructive colour. A fresh follow shows Following until the pointer leaves.

### When to use it

- A profile, creator page or people list needs follow and unfollow.
- A newsletter or channel offers subscribe.
- A team directory lets people watch a teammate's updates.

### Accessibility

It renders a button with aria-pressed and a steady name, Follow or Follow {name}, so screen readers announce the state rather than a changing label. With reduced motion labels and icons crossfade without rolling or blur.

### FAQ

**How do I name who is being followed?**

Pass name and the accessible name becomes "Follow Maya Chen".

**Does the Unfollow preview show on touch?**

No. It only appears on devices that can hover, so a tap never leaves a stuck Unfollow label.

## Source

- Registry detail: https://beui.dev/r/follow-button
- Raw source: https://beui.dev/r/follow-button/raw
- GitHub: https://github.com/starc007/ui-components
