Skip to content
Magic UI SolidMagicUI Solid

Pulsating Button

An animated pulsating button useful for capturing attention of users.

@/demos/PulsatingButtonDemo.tsx
import { PulsatingButton } from '@/registry/magicui/pulsating-button'
export function PulsatingButtonDemo() {
return <PulsatingButton>Join Affiliate Program</PulsatingButton>
}
Terminal window
pnpm dlx shadcn@latest add @magicui-solid/pulsating-button
import { PulsatingButton } from '@/components/magicui/pulsating-button'
<PulsatingButton>Pulsating Button</PulsatingButton>
@/demos/PulsatingButtonDemo2.tsx
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.

Credit to @shikhap04 & @abdmjd1 for the inspiration behind this component.

Original:

magicui.design/docs/components/pulsating-button