Docs / Components / Animated Border Button

Animated Border Button

A button component with a moving gradient border animation using motion/react and CSS offset-path.

Dependencies

Install the following dependencies to use this component:

1npm install motion clsx tailwind-merge

Installation

Run the following command in your terminal to add the component to your project:

1npx rankflow-ui@latest add animated-border

Props Reference

PropTypeDefaultDescription
childrenReactNode-The content of the button.
durationnumber2The duration of the border animation in seconds.
borderWidthnumber2The width of the animated border.
borderRadiusstring12pxThe border radius of the button.
classNamestring''Additional CSS classes.