Arunachalam

Thumbnail button video player

Buttons 228

About

The ThumbnailButton component displays a video thumbnail that, when clicked, opens a modal video player. It supports both YouTube embeds (via youtubeId) and direct video URLs (via videoUrl), and it gracefully handles missing thumbnail or video sources by falling back to sensible defaults.

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

Code

How Thumbnail button video player is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React, { useState } from 'react';
import ThumbnailButton from "@/components/ui/thumbnail-button-video-player";

const Demo: React.FC = () => {
  return (
    <div className="min-h-screen w-screen flex items-center justify-center bg-gray-50 dark:bg-zinc-950 transition-colors duration-500">
      <div className="flex flex-col gap-6 p-8">
        <h1 className="text-2xl font-bold text-center text-foreground mb-4">
          Thumbnail Button opens video player
        </h1>
        
        <div className="flex flex-col items-center gap-4 max-w-md">
          {/* YouTube Video */}
          <ThumbnailButton 
            youtubeId="dQw4w9WgXcQ" // Use the id from the youtube URL
            title="Never Gonna Give You Up"
          />
          
          {/* Regular Video File */}
          <ThumbnailButton
            videoUrl="https://me7aitdbxq.ufs.sh/f/2wsMIGDMQRdYyFbubgfAdJGgcHaXTtYDS9BWOoP8AKMkrxu6"
            thumbnailUrl="https://me7aitdbxq.ufs.sh/f/2wsMIGDMQRdYrcDsPep5NDIwsMcqZHiUGKxvuhb64FA8T3JP"
            title="Goku Goes Super Saiyan (MP4)"
          />
          
        </div>
      </div>
    </div>
  );
};

export default Demo;

Dependencies

More by Arunachalam

View all
  • Scroll media expansion hero

    Scroll media expansion hero

    10.8K
  • Profile Card Testimonial Carousel

    Profile Card Testimonial Carousel

    1.3K
  • Modern Animated Sign In

    Modern Animated Sign In

    1.1K
  • Bottom Nav Bar

    Bottom Nav Bar

    837
  • Adaptive Notch Navigation Bar

    Adaptive Notch Navigation Bar

    692
  • Toast

    Toast

    661
  • Connected Carousel

    Connected Carousel

    425
  • Animated File Tree

    Animated File Tree

    342

More in Buttons

View all
  • Texture Button

    Texture Button

    97
  • Button

    Button

    5
  • Button Group

    Button Group

  • Eclipse Button

    Eclipse Button

    39
  • Button

    Button

    4
  • HeroUI Button Group

    HeroUI Button Group

  • Base Button

    Base Button

    4
  • App Store Button

    App Store Button

    458