Kinetik UI

Confetti Burst

.md

A burst of confetti drawn as one Skia Atlas, with physics on the UI thread.

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

Installation

Kinetik CLI
npx kinetik-ui add confetti-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/confetti-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/confetti-burst.tsx
    View source files

Usage

import { ConfettiBurst, type ConfettiHandle } from '@/components/kinetik/confetti-burst';

const confetti = useRef<ConfettiHandle>(null);

<ConfettiBurst ref={confetti} style={StyleSheet.absoluteFill}>
  <Checkout onPaid={() => confetti.current?.burst()} />
</ConfettiBurst>;

Fire it with the ref (burst() or burst({ x, y }) to start from a point) or by changing trigger. The confetti is drawn over the children and never blocks touches.

When to use

  • Rare moments worth celebrating: first purchase, a finished goal, a streak.
  • Paired with a clear message about what happened.

When not to use

  • Routine confirmations. Celebrating every save makes the moment meaningless; use a toast.
  • On its own for important feedback. Screen readers do not see confetti; say what happened in text.

Notes

  • Hundreds of particles cost one draw call; the physics runs only while they are in the air.
  • Under reduced motion no particles appear, but the success haptic still plays.
  • colors defaults to the theme accents; pass brand colours for campaigns.

Props

ConfettiBurstProps

PropTypeDefaultDescription
childrenReactNode—Content the confetti flies over.
countnumber90Particles per burst, up to 300. Defaults to 90.
colorsstring[]—Particle colours. Defaults to the theme accents.
origin{ x: number; y: number }{ x: 0.5, y: 0.55 }Where bursts start, as fractions of the size (0–1). Defaults to the centre, slightly below the middle.
powernumber1Launch speed multiplier. Defaults to 1.
triggernumber | string—Change this value to fire a burst (e.g. a counter).
hapticsbooleantrueA success haptic with each burst. Defaults to true.
refRef<ConfettiHandle>—Imperative handle with `burst()`.
styleStyleProp<ViewStyle>—

Performance and accessibility

Performance

Budget
All particles are one Atlas draw call. Physics runs in a frame callback only while particles are alive (about 3 s per burst), then stops.
Measured

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

Real-device measurement pending.

Accessibility

Reduced motion
No particles; the success haptic still plays.
Screen readers
Decorative: the canvas is hidden. Announce the event that triggered the burst in your own UI.
Touch target
Not interactive; touches pass through to the content.

Source files

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