Ripple

Quiet radial press feedback.

A soft ink wave from the press point. Wrap a button or any surface and tune duration, opacity, and color.

Button

650ms
0.28
Color
tsx
import { Ripple } from "@/components/motion/ripple"import { Button } from "@/components/ui/button"export function Example() {  return (    <Ripple      className="inline-flex rounded-md"      duration={650}      opacity={0.28}      color="currentColor"      centered={false}    >      <Button>Press me</Button>    </Ripple>  )}

Surface

Press anywhere
650ms
0.28
Color
tsx
import { Ripple } from "@/components/motion/ripple"export function Example() {  return (    <Ripple      className="flex h-40 w-full max-w-sm items-center justify-center rounded-xl border border-border bg-muted/50"      duration={650}      opacity={0.28}      color="#71717a"      centered={false}    >      <span className="text-sm text-muted-foreground">Press anywhere</span>    </Ripple>  )}

Installation

npx @arctis-sh/@arctis-sh/ui@latest add ripple

Usage

import { Ripple } from "@/components/motion/ripple"import { Button } from "@/components/ui/button"
<Ripple className="inline-flex rounded-md">  <Button>Press me</Button></Ripple>

API Reference

Ripple

PropTypeDefault
durationnumber650
colorstringcurrentColor
opacitynumber0.28
centeredbooleanfalse
classNamestring—
childrenReactNode—

Also accepts the other native div attributes. Duration is in milliseconds.