Components (13)
Unboxing Bucket
MotionInteractive 3D unboxing container animation with emerging spring-physics feature chips powered by Motion (motion).
$ pnpm dlx shadcn@latest add @byphongphan/unboxing-bucketRequires
@byphongphan in components.jsonunboxing-bucket.tsx
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 motionRequires
@byphongphan in components.jsonCopy 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
Technical Insights & Architecture
This component is constructed using a 3-layer sandwich visual architecture:
- Layer 1 (Background SVGs): The open lid flaps, inside back wall, and interior shadow folds of the carton box.
- 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. - 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.
| Prop | Type | Default |
|---|---|---|
chips? | UnboxingChipItem[] | DEFAULT_CHIPS |
intervalMs? | number | 2600 |
className? | string | — |
UnboxingChipItem
Data structure for an individual emerging chip item.
| Prop | Type | Default |
|---|---|---|
id | number | string | — |
title | string | — |
description | string | — |
icon | React.ComponentType<{ className?: string }> | — |