# Components Button: Border Animation Buttons

Buttons with borders that animate and trace around the edge on hover. Draw attention to a primary action without changing the button fill at rest.

- Page: https://www.shadcn-ui-blocks.com/blocks/components/buttons/border-animation-buttons
- Collection: [Components](https://www.shadcn-ui-blocks.com/blocks/components), Free tier
- Group: [Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons)
- Created: 2026-06-14
- Preview image: https://www.shadcn-ui-blocks.com/blocks/components/buttons/border-animation-buttons.png

## Install

```bash
npx shadcn@latest add @shadcn-ui-blocks/components-buttons-border-animation-buttons
```

A free block: it installs with no account or key. Or install it by URL: `npx shadcn@latest add "https://www.shadcn-ui-blocks.com/r/components-buttons-border-animation-buttons.json"`.

## Depends on

- npm packages: class-variance-authority, radix-ui
- shadcn/ui components: button
- Installs to: `@/components/blocks/components/buttons/border-animation-buttons`

## About this block

Border Animation Buttons is a showcase of five button variants, laid out
in a centered, wrapping row with even spacing between each one. At rest
every button looks like its standard counterpart: Default, Secondary,
Destructive, Outline, and Ghost. On hover a border ring scales in from
just outside the button edge and fades into view, tracing the full
perimeter in one smooth motion without changing the button fill or
label.

The five variants are independent slots. You can drop in as many or as
few as your interface needs, swap the label text, or combine two variants
side by side when you want a primary and secondary action to sit
together. The animation runs identically across all variants so they read
as a consistent set.

## When to use

Reach for this block in a project management workspace where the
interface is already dense and you want a single action to stand out
without adding visual noise at rest. The border trace draws attention on
hover rather than at page load, so it suits toolbars, modal footers, and
confirmation dialogs where the buttons should feel calm until the user
is ready to act. Compared to a glow or fill effect, the border approach
stays legible against both light and dark surfaces.

A natural flow around it on a Components page:

**Before**

- [Cards](https://www.shadcn-ui-blocks.com/blocks/components/cards) to show buttons in context inside
  a real UI surface such as a task card or status panel
- [Badges](https://www.shadcn-ui-blocks.com/blocks/components/badges) to pair status indicators with
  the action buttons that follow them

**After**

- [Interactive Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/interactive-buttons)
  if you need motion that responds to click state as well as hover
- [Alerts](https://www.shadcn-ui-blocks.com/blocks/components/alerts) to pair a confirmation message
  with the action that triggered it

## What you can customize

All five standard button variants are present so you can pick the right
semantic weight for each action in your layout:

- **Primary actions.** Use the Default variant for the one action you
  most want a user to take, such as saving a project or confirming a
  change.
- **Destructive actions.** Swap in the Destructive variant for delete or
  leave flows so the risk is clear before the user clicks.
- **Quiet secondary actions.** The Ghost and Outline variants keep the
  surface calm while still getting the animated border treatment on
  hover.

> Tip: place the Default and Ghost variants side by side for a
> confirm/cancel pair that stays visually balanced at rest and gives
> each action a clear hierarchy on hover.

## More in Components Buttons

- [Cut Corners Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/cut-corners-buttons)
- [Extra Large Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/extra-large-buttons)
- [Extra Small Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/extra-small-buttons)
- [Grow Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/grow-buttons)
- [Interactive Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/interactive-buttons)
- [Liquid Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/liquid-buttons)
- [Morphing Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/morphing-buttons)
- [Pixel Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/pixel-buttons)
- [Pulse Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/pulse-buttons)
- [Rotate Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/rotate-buttons)
- [Shadow Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/shadow-buttons)
- [Skew Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/skew-buttons)
- [Slide Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/slide-buttons)
- [Social Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/social-buttons)
- [Squeeze Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/squeeze-buttons)
- [Underline Buttons](https://www.shadcn-ui-blocks.com/blocks/components/buttons/underline-buttons)
