Ballmac UI home

Ripple

Concentric rings that breathe outward as a background, plus a press ripple that spreads from the pointer (or the center for keyboard) on any surface.

Listening for events

Rings breathe quietly behind the content.

Installation

$ pnpm dlx shadcn@latest add @ballmac/ripple

Usage

import { Ripple, ClickRipple } from "@/components/ballmac/ripple"

The full example is in the Code tab above.

Examples

Press ripple on cards

Inbox
Drafts
Sent
Archive

API reference

<Ripple>

PropTypeDefault
circles

Number of rings.

number7
size

Diameter of the innermost ring in pixels.

number200
gap

Extra diameter added by each ring in pixels.

number70
duration

Seconds for one slow breath of the rings.

number4

<ClickRipple>

PropTypeDefault
duration

Seconds a ripple takes to spread and fade.

number0.7
centered

Ripples start from the center of the element instead of the pointer.

booleanfalse

Also accepts the standard attributes of its root element.

Accessibility

KeyAction
Screen readersAll rings and ripples are aria-hidden and pointer-events-none
Reduced motionRings are still and press ripples are skipped

Use with AI

<Ripple circles size gap duration /> fills its positioned parent. <ClickRipple centered duration> wraps a surface and ripples on pointer down, and from the center on Enter or Space when the wrapper itself has focus. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Ripple (@ballmac/ripple) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A calm focal point behind a central call to action
  • Touch feedback on custom cards and tiles

Not for

  • Standard buttons (the Ballmac button already has press feedback)

Registry JSON: https://ui.ballmac.com/r/ripple.json

Credits

Free to use in personal and commercial projects.

Registry
shadcn/utils