Free
Pro

Ripple

Adds a Material-style ink ripple on pointer press or Enter/Space. Attach base-ripple to any host — buttons, cards, list rows, and custom surfaces.

freenew

Buttons

Works with base-button and friends. Default ink is soft white for filled buttons.

HTML

Surfaces & color

On light backgrounds, set a dark rippleColor. Use rippleCentered to always expand from the middle.

HTML

Duration & disabled

Tune speed with rippleDuration (ms). Gate the effect with rippleDisabled, or rely on the native disabled attribute.

HTML

Installation

Run the following command to add this directive to your project:

bash

npx base-ui-cli add ripple

API Reference

For AI agents

Copy a prompt with the registry name, CLI install, and import — or add the Base UI MCP server.

bash

npx -y base-ui-mcp

Base UI provides standalone components. Import the exact elements you want to use into your component.

typescript (Example)

// Install: npx base-ui-cli add ripple
// Paths are relative to aliases.components (default: src/app/components)
import { RippleDirective } from './ripple/ripple.directive';

@Component({
  selector: 'app-your-component',
  imports: [
    RippleDirective
  ],
  template: `...`
})
export class YourComponent {}

API for ripple — generated from JSDoc in the library source.

API reference for ripple
APIMemberTypeDefaultDescription
[base-ripple]rippleColorunknownDEFAULT_COLORInk color (any CSS color). Defaults to a soft white for filled buttons. Use a dark rgba on light surfaces.
[base-ripple]rippleCenteredbooleanfalseAlways originates from the host center instead of the pointer position.
[base-ripple]rippleDisabledbooleanfalseDisables ripple creation while leaving the directive attached.
[base-ripple]rippleDurationnumberDEFAULT_DURATIONAnimation duration in milliseconds.