A cinematic multi-stage upload component with scanning, encryption, and progress animations.
Installation
Note: This component uses Framer Motion for layout transitions and animated states. It is inspired by shoryacodes
Usage
How It Works
- Uses a finite visual state system:
idlescanningencryptinguploadingdone
- Automatically sequences states using timed transitions.
- Uses
URL.createObjectURL()to generate a live preview. - Uses
motion.divwithlayoutfor smooth container resizing. - Includes animated overlays for:
- Scanning beam
- Encryption grid pulses
- Upload progress fill
- Automatically resets back to
idleafter completion.
Animation Flow
- User selects a file.
- Preview renders.
- Virus Scan animation plays.
- Encryption grid overlay animates.
- Upload progress fills.
- Completion state appears.
- Component resets.
API Reference
SmartUpload
| Prop | Type | Default |
|---|---|---|
status? | 'idle' | 'scanning' | 'encrypting' | 'uploading' | 'done' | - |
previewUrl? | string | null | - |
Note: This component is currently self-contained and does not expose external props.
You can extend it by addingonUploadStart,onUploadComplete, or real API integration.
Examples
Basic Usage
Features
- Multi-stage animated upload simulation
- Smooth layout transitions
- Live image preview
- Animated scanning beam
- Encryption grid pulse effect
- Dynamic progress indicator
- Auto reset after completion
- Fully responsive design