# Confetti

Seeded confetti burst with closed-form physics: launch spread, gravity, air drag, spin and flutter, in theme colors.

```bash
npx shadcn add https://www.reelcn.dev/r/confetti.json
```

Usage:

```tsx
<Sequence from={45} durationInFrames={90}>
  <Confetti origin={{ x: 50, y: 70 }} count={120} />
</Sequence>
```

Use for:

- Launches, milestones and end cards
- Celebrating the moment a number or result lands

Avoid:

- Emphasis on a single word or button. Use `sparkle-burst`

Dependencies:

- `remotion`


## Props

| Name | Type | Default | Description |
| --- | --- | --- | --- |
| delay? | `number` | — | Frames to wait before entering. |
| duration? | `number` | — | Enter duration in frames. Defaults to 0.6s. Some items reuse `duration` for an unrelated local timing. See that item's own prop docs. |
| exit? | `number \| boolean` | — | Exit at the end of the parent `<Sequence>`. `false` keeps it on screen, a number sets the exit length in frames. |
| motion? | `MotionPersonality` | — | Override the theme's motion personality. |
| poster? | `boolean` | — | Renders fully entered, with no exit: for a still frame or thumbnail. Defaults to `false`. |
| holdFrames? | `number` | — | Delays the start of the exit window by this many frames, for a minimum on-screen hold. Defaults to `0`. |
| origin? | `{ x: number; y: number; }` | `{ x: 50, y: 60 }` | Launch point in % of the canvas (0-100 on each axis), so it stays put at every aspect ratio. |
| count? | `number` | `90` | Number of pieces. |
| angle? | `number` | `-90` | Launch direction in degrees: -90 is straight up, 0 is to the right. |
| spread? | `number` | `70` | Width of the launch cone in degrees. |
| power? | `number` | `2200` | Launch speed of the fastest piece, in design units per second. |
| gravity? | `number` | `1000` | Downward acceleration in design units per second squared. |
| drag? | `number` | `2.2` | Air drag per second. Higher values stop pieces sooner and slow their fall. |
| size? | `number` | `22` | Piece size in design units. |
| life? | `number` | — | Frames each piece lives before it has faded out. Defaults to 3s. |
| shapes? | `ConfettiShape[]` | `["rect", "strip", "circle"]` |  |
| colors? | `string[]` | — | Piece colors. Defaults to the theme accent, highlight and foreground. |
| seed? | `string \| number` | `"confetti"` | Change it for a different burst; the same seed always renders the same frames. |
| style? | `CSSProperties` | — |  |
| className? | `string` | — |  |