Bubble Pack

Packed bubbles for categories grow around one big gradient bubble reading 420

Installation
$ pnpm dlx shadcn@latest add @remocn/bubble-pack

Usage

tsx
// src/Root.tsx
import { Composition } from "remotion";
import { BubblePack } from "@/components/remocn/bubble-pack";
 
const BubblePackScene = () => (
  <BubblePack
    highlight={0}
    items={[
      { label: "Launch videos", value: 420 },
      { label: "Demos", value: 180 },
      { label: "Changelogs", value: 150 },
      { label: "Tutorials", value: 70 },
    ]}
  />
);
 
export const RemotionRoot = () => (
  <Composition
    id="BubblePack"
    component={BubblePackScene}
    durationInFrames={150}
    fps={30}
    width={1280}
    height={720}
  />
);

Category bubbles pop in and pack together; the highlighted one swells into a large gradient bubble while its value counts up. Pass items (label and value, up to 16) and highlight, the index of the hero item. Ships dark and light via theme.

Props5

PropTypeDefault
items
BubbleItem[]DEFAULT_ITEMS

Up to 16 categories; bubble area follows value.

highlight
number0

Index in items of the bubble that grows into the hero.

accent
string"#3B5BFD"

Accent color for the hero element.

theme
"dark" | "light""dark"

Dark or light palette.

speed
number1

Playback multiplier.

  • itemsBubbleItem[]

    Up to 16 categories; bubble area follows value.

    DefaultDEFAULT_ITEMS

  • highlightnumber

    Index in items of the bubble that grows into the hero.

    Default0

  • accentstring

    Accent color for the hero element.

    Default"#3B5BFD"

  • theme"dark" | "light"

    Dark or light palette.

    Default"dark"

  • speednumber

    Playback multiplier.

    Default1