Liquid Reveal Button
A substantial acid-yellow pill CTA with a pointer-driven black liquid reveal — the mask originates at the real cursor position, expands to full cover with spatially-masked two-tone text, then retracts toward the exit point. One container-aware component adapts to card, side-panel, and fullscreen sizes.
Installation#
pnpm dlx shadcn@latest add @davinciui/liquid-reveal-buttonUsage#
API Reference#
| Prop | Type | Default |
|---|---|---|
childrenButton label. Kept on a single line and never moved by the reveal. | React.ReactNode | "View all projects" |
hrefRenders a semantic link instead of a button when supplied. | string | — |
onClickClick handler. Never interfered with by the reveal animation. | (event) => void | — |
modeDensity hint for the host surface. Physics and reveal behaviour are identical in every mode. | "card" | "preview" | "fullscreen" | "preview" |
backgroundColorPill base colour (acid yellow in the reference). | string | "#E5FF46" |
hoverColorLiquid reveal colour. | string | "#111111" |
textColorLabel colour over the base pill. | string | "#141414" |
hoverTextColorDuplicate-label colour, visible only inside the reveal mask. | string | "#FFFFFF" |
borderColorThin pill outline, stable through the whole interaction. | string | "#141414" |
showDemoCursorRenders the fixed black demo cursor that tracks the pointer over the button. Demo-only; the button never replaces the site cursor. | boolean | false |
Accessibility#
The native button or anchor keeps its label and keyboard activation, and ariaLabel sets an accessible name. Focus expands the reveal and focus-visible draws a 2px outline. The duplicate reveal label and demo cursor are aria-hidden; disabled is not forwarded to anchors.
Motion#
A pointer-driven circle clip-path expands and retracts through requestAnimationFrame lerping with fixed rates, not configurable timing props. prefers-reduced-motion is checked and jumps the mask instantly, disables demo-cursor easing, and turns off CSS transitions.
View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

