Mohammad Shehadeh

Video Player

Component 12

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

    99
  • Feature Problem Cards

    Feature Problem Cards

    99
  • Split Login

    Split Login

    93
  • Feature Grid Spotlight Cards

    Feature Grid Spotlight Cards

    90
  • Comparison Section

    Comparison Section

    81
  • Rounded Top Footer

    Rounded Top Footer

    79
  • Comparison Table

    Comparison Table

    77
  • FAQ Two Column

    FAQ Two Column

    76

Explore more

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