Installation
Usage
Props
URL of the video to be played (use embed URLs for YouTube)
URL of the thumbnail image
Alt text for the thumbnail image
Animation style for the dialog entrance and exit
Additional CSS classes to apply
Animation Styles
TheanimationStyle prop accepts the following values:
from-bottom- Slides in from bottom, exits to bottomfrom-center- Scales up from center, scales down to centerfrom-top- Slides in from top, exits to topfrom-left- Slides in from left, exits to leftfrom-right- Slides in from right, exits to rightfade- Simple fade in and outtop-in-bottom-out- Slides in from top, exits to bottomleft-in-right-out- Slides in from left, exits to right
Examples
Top-in-bottom-out Animation
From Center (Default)
Features
- Multiple animation presets
- Smooth spring-based animations
- Backdrop blur effect
- Click or keyboard to close (Escape, Enter, Space)
- Responsive design
- YouTube embed support
- Hover effects on thumbnail
- Accessible controls
Notes
- For YouTube videos, use the embed URL format
- Dialog closes on backdrop click or keyboard shortcuts
- Thumbnail shows hover effect with play button