Kinetik UI

Like Burst

.md

A like button whose heart pops with a ring of light and a spray of sparks while the count rolls over.

v1.0.0Live on web@shopify/react-native-skiareact-native-reanimatedreact-native-worklets
Component preview

Installation

Kinetik CLI
npx kinetik-ui add like-burst

The CLI copies the source and installs native dependencies with npx expo install, so versions match your Expo SDK. With shadcn: npx shadcn@latest add https://kinetik-ui.dev/r/like-burst.json

Install manually

  1. Install dependencies
    npx expo install @shopify/react-native-skia react-native-reanimated react-native-worklets
  2. Copy the source files
    • components/kinetik/like-burst.tsx
    View source files

Usage

import { LikeBurst } from '@/components/kinetik/like-burst';

<LikeBurst count={post.likesFromOthers} liked={post.liked} onLikedChange={toggleLike} />;

count is everyone else's likes; the viewer's own like is added on top, so the number moves the moment they tap, before your request returns. Counts are compact by default (1.2K, 3.1M); pass formatCount to change that.

When to use

  • Likes, favourites and saves on posts, photos and products, where a little delight rewards the tap.
  • Feeds, where the heart sits beside a count.

When not to use

  • Settings and anything that is not an expression of taste. Use a switch.
  • Many hearts in a dense grid. The burst needs a little room and draws attention.

Notes

  • Only a tap here bursts. A like that arrives from the parent (another device, a refetch) just fills the heart.
  • The burst reaches about a third of the heart's size past its box. Leave a little space around it.
  • With reduced motion the heart fills quietly and the count changes in place.

Props

LikeBurstProps

PropTypeDefaultDescription
likedboolean—Controlled state. Leave unset to let the button keep its own.
defaultLikedbooleanfalseInitial state when uncontrolled. Defaults to false.
onLikedChange(liked: boolean) => void—
countnumber—Likes from everyone else. The viewer's own like is added on top, so the number moves the moment they tap. Leave unset to hide the count.
formatCount(count: number) => stringcompactCount
colorstring—Heart colour once liked. Defaults to the theme danger red.
sizenumber26Heart size. Defaults to 26.
accessibilityLabelstring'Like'Defaults to 'Like'.
hapticsbooleantrueA light tap on like. Defaults to true.
disabledbooleanfalse
testIDstring—
styleStyleProp<ViewStyle>—
countStyleStyleProp<TextStyle>—

Performance and accessibility

Performance

Budget
One small Skia canvas: a ring, ten dots and the heart, all read from three shared values. Nothing runs at rest.
Measured

Pixel 9 emulator, API 35, release build · interaction median 1.00× the system Settings app on the same emulator (indicative only) · no frames drawn at rest · 153 MB app memory

Real-device measurement pending.

Accessibility

Reduced motion
The heart fills without the pop, the ring or the sparks, and the count changes in place.
Screen readers
A toggle button with a checked state; the count is its value.
Touch target
The heart's box is 57 pt at the default size and the row is at least 44 pt tall.

Source files

components/kinetik/like-burst.tsx is in the Code tab of the preview above.