Unboxing Bucket

Motion

Interactive 3D unboxing container animation with emerging spring-physics feature chips powered by Motion (motion).

$ pnpm dlx shadcn@latest add @byphongphan/unboxing-bucket
Requires @byphongphan in components.json
interactive
Loading preview...

Live Interactive Stage

Interactive 3D unboxing container animation with emerging spring-physics feature chips powered by Motion (motion). Watch the sequence of feature chips float up from the package cavity, hover in 3D perspective, and dissolve upward.


Installation

Install the following dependencies:

$ pnpm add lucide-react motion
Requires @byphongphan in components.json

Copy and paste the following code into your project.

components/unboxing-bucket.tsx
hooks/use-media-query.ts

Update the import paths to match your project setup.


Usage

import { UnboxingBucket } from "@/components/unboxing-bucket"
;<UnboxingBucket intervalMs={2600} className="py-12" />

Technical Insights & Architecture

This component is constructed using a 3-layer sandwich visual architecture:

  1. Layer 1 (Background SVGs): The open lid flaps, inside back wall, and interior shadow folds of the carton box.
  2. Layer 2 (Middle Motion Stage): The animated floating chip managed by AnimatePresence mode="popLayout", starting tucked inside the box cavity, springing upward, and floating away.
  3. Layer 3 (Foreground SVGs): The front carton body and dropped lip flap with pointer-events-none, naturally occluding the lower part of the chip as it emerges from inside the package.

API Reference

UnboxingBucket

Interactive 3D unboxing container animation with emerging spring-physics feature chips.

PropTypeDefault
chips?UnboxingChipItem[]DEFAULT_CHIPS
intervalMs?number2600
className?string—

UnboxingChipItem

Data structure for an individual emerging chip item.

PropTypeDefault
idnumber | string—
titlestring—
descriptionstring—
iconReact.ComponentType<{ className?: string }>—

Command Palette

Quick search and commands navigation