bidyut10

Download Button

Buttons 7

About

A button that morphs through download, downloading, and downloaded states with a crossfading icon and label so users get inline progress feedback without a separate progress bar.

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

Code

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

Usage.tsx

import { DownloadButton } from "@/components/ui/download-button";

export default function DownloadButtonDemo() {
  const fetchFile = () => {
    // simulate a file download trigger
    console.log("downloading file...");
  };

  return (
    <div className="flex min-h-[240px] w-full items-center justify-center">
      <DownloadButton label="Download" onDownload={fetchFile} />
    </div>
  );
}

Dependencies

More by bidyut10

View all
  • Honey Ember Background

    Honey Ember Background

    53
  • Sheen Pill Button

    Sheen Pill Button

    41
  • Booking Slot Calendar

    Booking Slot Calendar

    27
  • Tactile 3D Button

    Tactile 3D Button

    13
  • Add to Cart Button

    Add to Cart Button

    12
  • Date Range Picker Card

    Date Range Picker Card

    1

More in Buttons

View all
  • Button Save

    Button Save

    46
  • Button

    Button

    20
  • Eclipse Button

    Eclipse Button

    5
  • Button

    Button

    32
  • Button

    Button

    6
  • Button

    Button

    14
  • Button Group

    Button Group

    37
  • Split Button

    Split Button

    32