Code And Chill

Parachute — Animated Download Button with Progress

Buttons 10

About

Download button: the ring unrolls into a progress bar while the arrow parachutes onto it and folds into a check. Cancel, error/retry and real streaming downloads in the full version: codeandchill.store/components/parachute?utm_source=21st

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

Code

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

Usage.tsx

"use client";

import { useEffect, useState } from "react";
import ParachuteDownloadButton, { type ParachuteTheme } from "@/components/ui/parachute-download-button";

const settings = {
  fileName: "paradrop-kit.zip",
  fileSize: "4.2 MB",
  accent: "#2ee6dc",
  duration: 2800,
};

const BACKDROP: Record<ParachuteTheme, { background: string; aura: string; note: string }> = {
  dark: {
    background: "radial-gradient(120% 90% at 50% 34%, #071219, #04070a 68%)",
    aura:
      "radial-gradient(38% 34% at 50% 40%, rgba(46,230,220,.09), transparent 70%), radial-gradient(30% 26% at 22% 74%, rgba(92,216,255,.055), transparent 72%)",
    note: "#6f8a93",
  },
  light: {
    background: "radial-gradient(120% 90% at 50% 34%, #ffffff, #e6f0f2 68%)",
    aura:
      "radial-gradient(38% 34% at 50% 40%, rgba(46,230,220,.14), transparent 70%), radial-gradient(30% 26% at 22% 74%, rgba(92,216,255,.10), transparent 72%)",
    note: "#4a646d",
  },
};

export default function Demo(props: Partial<typeof settings> = {}) {
  const s = { ...settings, ...props };
  // opens in the template's own look (dark), then follows the page's `dark` class when it changes
  const [theme, setTheme] = useState<ParachuteTheme>("dark");

  useEffect(() => {
    const root = document.documentElement;
    let wasDark = root.classList.contains("dark");
    const obs = new MutationObserver(() => {
      const isDark = root.classList.contains("dark");
      if (isDark !== wasDark) {
        wasDark = isDark;
        setTheme(isDark ? "dark" : "light");
      }
    });
    obs.observe(root, { attributes: true, attributeFilter: ["class"] });
    return () => obs.disconnect();
  }, []);

  const look = BACKDROP[theme];

  return (
    <div
      className="relative flex min-h-[100dvh] w-full items-center justify-center overflow-hidden px-4 py-12"
      style={{ background: look.background }}
    >
      <div aria-hidden="true" className="pointer-events-none absolute -inset-1/4" style={{ background: look.aura }} />
      <div className="relative flex flex-col items-center">
        <ParachuteDownloadButton
          theme={theme}
          fileName={s.fileName}
          fileSize={s.fileSize}
          accent={s.accent}
          duration={s.duration}
        />
        <p className="mt-6 text-xs uppercase tracking-[0.16em]" style={{ color: look.note, opacity: 0.75 }}>
          Press it. The ring becomes the bar.
        </p>
      </div>
    </div>
  );
}

More by Code And Chill

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    696
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    355
  • Hovira — Glassmorphism Smart Home Dashboard

    Hovira — Glassmorphism Smart Home Dashboard

    86
  • Vitra — Glass Pricing Section

    Vitra — Glass Pricing Section

    71
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    57
  • Money River — Sankey Money Flow Chart

    Money River — Sankey Money Flow Chart

    40
  • Kestrel — Marketing Analytics Dashboard

    Kestrel — Marketing Analytics Dashboard

    36
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    31

More in Buttons

View all
  • Button

    Button

    166
  • Texture Button

    Texture Button

    121
  • Button

    Button

    21
  • Figma File Button

    Figma File Button

    39
  • Native Button

    Native Button

    12
  • Button

    Button

    88
  • HeroUI Button Group

    HeroUI Button Group

    11
  • Great UI Button

    Great UI Button

    19