Skip to content

Ripple

MotionMIT
View in Storybook

Material-style ripple effect on press — for buttons and tappable surfaces.

bun add @otfdashkit/ui

Preview

Ripple
Loading Storybook preview…

Code

import { Ripple } from '@otfdashkit/ui'

export function Example() {
  return (
    <Ripple className="inline-block rounded-lg border border-border bg-card px-8 py-4 cursor-pointer select-none">
      <span className="text-foreground font-medium">Click me for ripple</span>
    </Ripple>
  )
}

Free with the SDK. This pattern ships in @otfdashkit/ui under the MIT license.

Props

Props declared in the Ripple source. Inherited HTML attributes are not listed.

PropTypeDefaultDescription
childrenrequiredReactNode
colorstring'currentColor'Ripple color — defaults to current text color at 20% opacity
durationnumber0.6Duration in seconds