Pulsating Button
An animated pulsating button useful for capturing attention of users.
import { PulsatingButton } from '@/registry/magicui/pulsating-button'
export function PulsatingButtonDemo() { return <PulsatingButton>Join Affiliate Program</PulsatingButton>}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/pulsating-buttonbunx shadcn@latest add @magicui-solid/pulsating-buttonyarn dlx shadcn@latest add @magicui-solid/pulsating-buttonnpx shadcn@latest add @magicui-solid/pulsating-buttonImport
Section titled “Import”import { PulsatingButton } from '@/components/magicui/pulsating-button'<PulsatingButton>Pulsating Button</PulsatingButton>Examples
Section titled “Examples”Ripple Variant
Section titled “Ripple Variant”import { PulsatingButton } from '@/registry/magicui/pulsating-button'
export function PulsatingButtonDemo2() { return ( <PulsatingButton variant="ripple" distance="10px" class="bg-blue-400 text-white" > Join Affiliate Program </PulsatingButton> )}| Prop | Type | Default | Description |
|---|---|---|---|
children |
JSX.Element |
- |
The content of the button. |
class |
string |
- |
Additional class names for the button. |
pulseColor |
string |
Derived from button background |
Any valid CSS color for the pulsing waves. |
duration |
string |
1.5s |
The duration of one pulse. |
distance |
string |
8px |
How far the pulse expands from the button. |
variant |
"pulse" / "ripple" |
pulse |
The pulse animation style. |
Credits
Section titled “Credits”Credit to @shikhap04 & @abdmjd1 for the inspiration behind this component.
Original:
magicui.design/docs/components/pulsating-button