Media
A versatile component for displaying images, videos, and YouTube content with optional parallax effects.
Installation
Install the following dependencies:
react-youtube
Import the component:
import Media from "@/components/utils/Media"
Basic Image
Display images with optional alt text and responsive sizing.

Video Support
Handle video files with autoplay and loop options.
YouTube Integration
Easily embed YouTube videos using the videoId prop.
Parallax Effect
Add smooth parallax scrolling effects to your media.

Props
Prop
Type
Default
Description
filestring—
Path to the media file (image or video)
youtubeLinkstring—
YouTube video URL
autoplayboolean—
Enable autoplay for videos
loopboolean—
Enable looping for videos
parallaxboolean—
Enable parallax scrolling effect
altstring—
Alt text for images