Code And Chill

Depot — Animated Order Button (Delivery Van)

Buttons 17

About

An Order button with a delivery scene inside: a van pulls up, loads the parcel, drives off and the button turns into a check. Accessible, reduced-motion aware. Checkout card in the full version: codeandchill.store/components/depot?utm_source=21st

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Depot — Animated Order Button (Delivery Van) to your project and fits it to your theme.

Code

How Depot — Animated Order Button (Delivery Van) is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import { useEffect, useState } from "react";
import DepotOrderButton from "@/components/ui/depot-order-button";

const settings = {
  label: "Order Now",
  doneLabel: "Order Placed",
  doneMessage: "Order placed. Arriving Thursday 14 August. Tracking has been sent to your email.",
};

export default function Demo(props: Partial<typeof settings> = {}) {
  const s = { ...settings, ...props };
  // Depot opens dark (the near-black page of its showcase video), then follows the page's `dark` class only when it changes.
  const [dark, setDark] = useState(true);
  useEffect(() => {
    const html = document.documentElement;
    let last = html.classList.contains("dark");
    const mo = new MutationObserver(() => {
      const now = html.classList.contains("dark");
      if (now !== last) { last = now; setDark(now); }
    });
    mo.observe(html, { attributes: true, attributeFilter: ["class"] });
    return () => mo.disconnect();
  }, []);

  const backdrop = dark
    ? "#100e0c"
    : "radial-gradient(74% 52% at 50% 46%, rgba(242,169,59,.16), transparent 70%), linear-gradient(180deg, #f4eee2, #fbf7f0 58%)";

  return (
    <div
      className="flex min-h-[100dvh] w-full items-center justify-center overflow-x-hidden px-4 py-10"
      style={{ background: backdrop, backgroundColor: dark ? "#100e0c" : "#fbf7f0" }}
    >
      {/* The button sits on the cream order card, as in Depot's showcase video. */}
      <div
        className="w-full max-w-[400px] rounded-[24px] px-[22px] py-[34px]"
        style={{
          background: "#fbf7f0",
          boxShadow: dark
            ? "0 1px 0 rgb(255 255 255 / .5) inset, 0 24px 60px -28px rgb(0 0 0 / .8), 0 2px 10px -4px rgb(0 0 0 / .5)"
            : "0 1px 0 rgb(255 255 255 / .6) inset, 0 24px 60px -30px rgb(60 40 20 / .35), 0 2px 10px -4px rgb(60 40 20 / .18)",
        }}
      >
        <DepotOrderButton label={s.label} doneLabel={s.doneLabel} doneMessage={s.doneMessage} />
      </div>
    </div>
  );
}

More by Code And Chill

View all
  • Fernly — Project Management Dashboard with Kanban

    Fernly — Project Management Dashboard with Kanban

    779
  • Corbel — Sales Analytics Dashboard

    Corbel — Sales Analytics Dashboard

    516
  • Hovira — Glassmorphism Smart Home Dashboard

    Hovira — Glassmorphism Smart Home Dashboard

    88
  • Vitra — Glass Pricing Section

    Vitra — Glass Pricing Section

    82
  • Halden — CRM Dashboard with Sales Pipeline

    Halden — CRM Dashboard with Sales Pipeline

    75
  • Kestrel — Marketing Analytics Dashboard

    Kestrel — Marketing Analytics Dashboard

    48
  • Money River — Sankey Money Flow Chart

    Money River — Sankey Money Flow Chart

    41
  • Meniscus — Liquid Bottom Navigation Bar

    Meniscus — Liquid Bottom Navigation Bar

    36

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