Arunachalam

Media Button

Buttons 176

About

MediaButton is a reusable React component that displays a button with a smooth hover effect revealing a looping .mp4, .webm, or .gif background, with a dark overlay to keep the text readable.

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

Code

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

Usage.tsx

import React from 'react';
import { MediaButton } from "@/components/ui/media-button";

export default function Demo() {
  return (
    <div className="h-screen flex flex-col items-center justify-center gap-10 bg-muted">
      <MediaButton
        label="Button (Video)"
        mediaUrl="https://cdn.21st.dev/assets/mirror/9b/9b72a2e7ff75d9bc7e60c6b7bcba8197432fa51f924f3e6b0ca25fbd07d99573.mp4"
      />
      <MediaButton
        label="Button (GIF)"
        mediaUrl="https://cdn.21st.dev/assets/mirror/b7/b7efd19cbe3a84627d84304ef41aab2b256240c34b6caa4a2683d5f28511b446.gif"
      />
    </div>
  );
}

Dependencies

More by Arunachalam

View all
  • Scroll media expansion hero

    Scroll media expansion hero

    11.5K
  • Profile Card Testimonial Carousel

    Profile Card Testimonial Carousel

    1.4K
  • Modern Animated Sign In

    Modern Animated Sign In

    1.2K
  • Bottom Nav Bar

    Bottom Nav Bar

    1K
  • Adaptive Notch Navigation Bar

    Adaptive Notch Navigation Bar

    800
  • Toast

    Toast

    681
  • Connected Carousel

    Connected Carousel

    602
  • Animated File Tree

    Animated File Tree

    373

More in Buttons

View all
  • Texture Button

    Texture Button

    122
  • Button

    Button

    172
  • HeroUI Button Group

    HeroUI Button Group

    1
  • Button

    Button

    88
  • Native Button

    Native Button

    7
  • Button

    Button

    74
  • Button Group

    Button Group

    5
  • Button

    Button

    21