Mohammad Shehadeh

Video Player

Component 15

About

Composable video player with click or Space to play, scrub-safe seek with buffered tint, time readouts, volume, full screen, and controls that fade out while it plays.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Video Player to your project and fits it to your theme.

Code

How Video Player is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import {
  VideoPlayer,
  VideoPlayerControls,
  VideoPlayerFullscreen,
  VideoPlayerPlay,
  VideoPlayerSeek,
  VideoPlayerTime,
  VideoPlayerVideo,
  VideoPlayerVolume,
} from "@/components/ui/video-player";

export default function VideoPlayerDemo() {
  return (
    <div className="mx-auto w-full max-w-2xl">
      <VideoPlayer>
        <VideoPlayerVideo src="https://cdn.21st.dev/assets/localized/0cd83d944a6ca7822b4a8306cecc60a36e859b041f6702c6a1ad9ead78924451.mp4" />
        <VideoPlayerControls>
          <VideoPlayerPlay />
          <VideoPlayerTime mode="elapsed" />
          <VideoPlayerSeek />
          <VideoPlayerTime mode="remaining" />
          <VideoPlayerVolume />
          <VideoPlayerFullscreen />
        </VideoPlayerControls>
      </VideoPlayer>
    </div>
  );
}

Dependencies

More by Mohammad Shehadeh

View all
  • Ecommerce Category Page

    Ecommerce Category Page

    130
  • Rounded Top Footer

    Rounded Top Footer

    112
  • Feature Grid Spotlight Cards

    Feature Grid Spotlight Cards

    111
  • Feature Problem Cards

    Feature Problem Cards

    111
  • Split Login

    Split Login

    109
  • FAQ Two Column

    FAQ Two Column

    95
  • Dithered Shader CTA

    Dithered Shader CTA

    88
  • Comparison Section

    Comparison Section

    88

Explore more

Part of Hirael — browse the full library on 21st.dev.