Skip to content
Menu

Buttons

Captioned Like Button

Captioned Like Button: An icon-only heart button that reveals a caption rising from beneath on hover or focus, and fills solid with a quick overshoot when liked.

Using Captioned Like Button

Captioned Like Button uses the inline preview frame with a light/dark theme setting.

Customize the preview

These controls are passed to the demo. Defaults and limits describe the preview; consult the implementation for its full prop API.

ControlTypeDefaultPreview limits
accentcolor#FF4D8DNo additional limit in the metadata.
captiontextLikeUp to 16 characters
likedCaptiontextLikedUp to 16 characters
sizenumber30From 16 to 56; step 2
showCountbooleantrueNo additional limit in the metadata.
startLikedbooleanfalseNo additional limit in the metadata.
Which frameworks are available for Captioned Like Button?

Captioned Like Button is available for React, Vue, Svelte, Astro, HTML. The live preview uses React; the source observations below apply to index.tsx. Check the selected port before relying on the same interactions.

What does Captioned Like Button depend on?

The React metadata lists these npm dependencies beyond React: motion.

What accessibility details are visible in Captioned Like Button?

The React source for Captioned Like Button includes: attributes and handlers (aria-hidden, aria-label, aria-pressed). These are source observations. Verify accessible names, focus order and keyboard behavior in the composed page.

How does Captioned Like Button handle reduced motion?

Captioned Like Button reads the motion preference in its React source through useReducedMotion(). Preference-dependent expressions in index.tsx: duration: reduced ? 0 : 0.18; duration: reduced ? 0.15 : 0.22; liked && !reduced ? { duration: 0.38, times: [0, 0.4, 1], ease: "easeOut" } : { duration: reduced ? 0 : 0.18 }. Check the full implementation, shared styles and selected port with reduced motion enabled; these observations do not establish that every animation stops.

Connect your agent

Related open components