- Components
- Motion
- Ripple
Shadcn Ripple Components
A click ripple that spreads from the pointer on buttons, cards, list items, chips, tabs and images, with custom color, duration, opacity and a centered mode for icon buttons and keyboard presses. Skipped for reduced motion. Browse our collection of 10 Shadcn Ripple variants.
Basic
Button variants
Colors
Icon buttons
Product card
Settings list
Filter chips
Floating action button
Image grid
Tabs
Unlock premium components
Explore Shadcn Blocks
Ready-made page sections built with the same components.
Shadcn Ripple Component
The Shadcn Ripple draws a soft wave that spreads from the exact point where the user clicks. It confirms a press instantly, which makes buttons, cards and list rows feel responsive, especially on touch screens and in apps inspired by Material Design.
This collection adds the ripple to the elements people tap the most: every Button variant, colored buttons, round icon buttons for like and save, a product card, a settings list, filter chips, a floating action button, an image grid and Tabs. It is a small React component for shadcn/ui and Tailwind CSS with no animation library, and it works next to Radix UI and Base UI components.
What is the Shadcn Ripple Component?
Ripple is an empty layer you place inside any element with relative and overflow-hidden. It listens to pointer presses on its parent, adds a circle at the press position and lets a CSS animation grow and fade it. The circle is removed when the animation ends, so nothing piles up in the DOM.
The ripple uses the current text color by default, so it is light on a dark button and dark on a light one. Keyboard presses with Enter or Space start the wave from the center, and users who prefer reduced motion do not see it at all.
Anatomy of the Shadcn Ripple
| Part | Description |
|---|---|
| Ripple | The wave layer. Props: color, duration, opacity, centered and disabled. |
| Parent element | Any clickable element with relative overflow-hidden, such as a Button, a card link or a list row. |
10 Shadcn Ripple Variants
Each ripple variant listed here is previewed live at the top of this page, together with its source code and install command.
- Basic: A primary button with a ripple.
- Button variants: Default, secondary, outline, ghost and destructive buttons, each with a ripple in its own text color.
- Colors: Outline buttons with blue, emerald and violet ripples.
- Icon buttons: Round like, save and share buttons with centered ripples and toggled states.
- Product card: A whole product card that ripples from the pressed point.
- Settings list: Navigation rows with icons and chevrons.
- Filter chips: A multi select Toggle Group of rounded filter chips.
- Floating action button: A large round create button with a slow centered ripple.
- Image grid: Photo tiles with a white ripple on top of the image.
- Tabs: Tab triggers that ripple when selected.
How to Install the Shadcn Ripple Component
Set up shadcn/ui in your project if you have not already, then add the Shadcn UI Kit registry to your components.json once:
{
"registries": {
"@shadcnuikit": "https://shadcnuikit.com/r/{name}.json"
}
}Then install a ripple variant by its name:
npx shadcn@latest add @shadcnuikit/ripple1The same command works with pnpm dlx, yarn dlx and bunx --bun. Each variant has a copy button for every package manager, and the code is added to your project as plain React and Tailwind CSS that you can edit freely.
How to Use the Shadcn Ripple Component
Add relative overflow-hidden to the element and render Ripple inside it. The element keeps its own click handler.
import { Button } from "@/components/ui/button"
import { Ripple } from "@/components/ui/ripple"
export function SaveButton() {
return (
<Button className="relative overflow-hidden">
<Ripple />
Save changes
</Button>
)
}Why Use the Shadcn Ripple Component
- Instant feedback: The wave starts on pointer down, before the click finishes, so presses feel immediate.
- Works on any element: Buttons, cards, links, list rows, chips, tabs and images all use the same component.
- No dependency: A small component with a CSS keyframe, no animation library and no re-renders per click.
- Keyboard aware: Enter and Space presses start a centered wave, so keyboard users get the same feedback.
- Respects reduced motion: The ripple is skipped when users prefer reduced motion.
Common Ripple Use Cases
- Mobile style apps: Material inspired buttons and lists.
- Product grids: Cards that react to taps.
- Settings: Navigation rows and menus.
- Filters: Chips and segmented controls.
- Social actions: Like, save and share buttons.
- Primary actions: Floating action buttons.
Customizing the Shadcn Ripple
Set color to any CSS color or variable, for example var(--color-blue-500), and raise opacity on light backgrounds. duration controls how long the wave takes to fade, and centered always starts it from the middle, which suits icon buttons.
<Button size="icon" variant="ghost" className="relative overflow-hidden rounded-full">
<Ripple centered color="var(--color-rose-500)" opacity={0.3} />
<HeartIcon />
</Button>Ripple Accessibility and Keyboard Support
The ripple layer is aria-hidden and ignores pointer events, so it never changes how the element is announced or clicked. Keep a visible focus ring on the parent element, because the ripple is feedback for the press, not for focus.
When the user prefers reduced motion, no wave is drawn. Do not rely on the ripple to communicate state; use text, icons or aria-pressed for toggles.
| Key | Action |
|---|---|
| Enter / Space | Activates the element and starts a centered ripple. |
Ripple Best Practices
- Use a ripple on elements users press often, not on static content.
- Keep the opacity low so the wave does not hide text.
- Use centered ripples on round icon buttons.
- Match the ripple color to the element, for example white on images.
- Do not combine a ripple with a heavy hover animation on the same element.
Shadcn Ripple for AI Agents
Ripple gives an agent press feedback it can add to any clickable element: buttons, product cards, settings rows, filter chips, tabs and icon buttons. Claude Code only needs to add relative overflow-hidden and a Ripple child, and can match the color to the element.
Install it with an AI agent
Claude Code, Cursor, Codex and other agents can install these with the shadcn CLI, for example npx shadcn@latest add @shadcnuikit/ripple1. With the Shadcn UI Kit MCP server, your agent can search every variant by name and add the right one for you. To give it full context, share /components/ripple.md, the Markdown version of this page with every variant and install command.
Example prompts
- “Add a Ripple to every primary and outline Button in our mobile checkout.”
- “Make the product cards in the shop grid ripple from the tap position.”
- “Use centered rose Ripples on the like buttons in the feed.”
Customize it with AI
The parent must be relative and overflow-hidden, or the wave spills out. Ask the agent to keep the default currentColor where possible, raise opacity only on light surfaces, use centered for round icon buttons and keep aria-pressed for toggles instead of relying on the ripple.
Components Related to Ripple
Shadcn Ripple FAQ
npx shadcn@latest add @shadcnuikit/ripple1. With a Pro plan, the Shadcn UI Kit MCP server can also build complete sections and pages around it.Looking for something else? Browse all shadcn/ui components or ready-made UI blocks built with them.

















