Back to Components

Buttons

Four independent animated buttons: letter lift, flowing liquid fill, magnetic cursor pull, and cursor-driven dent deformation — all using the same fixed geometry with no layout resizing.

Preview

Staggered Letter Lift
Single Liquid Bubble
Magnetic
Cursor Compression

Installation

Install the component using the CLI.

npx shadcn@latest add https://shreyashtech.me/r/buttons.json

Usage

Import the component:

import ButtonsShowcase, { AnimatedButton } from "@/components/buttons"

Use it in your code:

<AnimatedButton variant="magnetic" />

Props

PropertyTypeDefaultDescription
variant"letters" | "liquid" | "magnetic" | "compression"-Which single interaction to render.
labelstring"Book a call"Button text.
onClickfunction-Called on click/activation.
theme"light" | "dark" | "system"systemColor theme for the button surface, text, and effects.
classNamestring-Extra classes applied to the outermost element.