Skip to content

PressableFeedback

Open .md
Live preview

Loading example…

Wraps any content with press feedback: a ripple from the pointer and a small scale-down. Both are skipped under prefers-reduced-motion. It adds no semantics, so put it around (or let it contain) the real button or link.

import { PressableFeedback } from "@jcsoftdev/ui/atoms";

Single-component entry points tree-shake to just this component: @jcsoftdev/ui/atoms/pressable-feedback.

export const Default: Story = {};

Source of the Storybook story.

Prop Type Default Description
ripple boolean true Draws an expanding ripple from the pointer position.
scale boolean true Scales the content down while pressed (uses the preset’s --press-scale).
disabled boolean

* marks a required prop.

It also accepts the native props of the element or primitive it renders (for example className, id, aria-* and event handlers).

packages/ui/src/atoms/pressable-feedback/pressable-feedback.tsx