About
A Send button that folds itself into a paper plane, throws it off the corner and lands on Sent. Accessible, reduced-motion aware. Plain HTML/CSS/JS drop-in in the full version: codeandchill.store/components/dart?utm_source=21st
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Dart — Animated Send Button (Paper Plane) to your project and fits it to your theme.
Code
How Dart — Animated Send Button (Paper Plane) is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { useEffect, useState } from "react";
import DartSendButton from "@/components/ui/dart-send-button";
const settings = {
label: "Send",
sentLabel: "Sent",
holdMs: 1500,
};
export default function Demo(props: Partial<typeof settings> = {}) {
const s = { ...settings, ...props };
// Dart always opens dark, then follows the page's `dark` class only when it changes.
const [theme, setTheme] = useState<"dark" | "light">("dark");
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; setTheme(now ? "dark" : "light"); }
});
mo.observe(html, { attributes: true, attributeFilter: ["class"] });
return () => mo.disconnect();
}, []);
const dark = theme === "dark";
// One soft key light above the seat, so the page reads as a room.
const backdrop = dark
? "radial-gradient(58% 42% at 50% 44%, rgba(230,192,127,.085), transparent 70%), radial-gradient(90% 70% at 50% 120%, rgba(120,140,190,.06), transparent 70%), #07080b"
: "radial-gradient(58% 42% at 50% 44%, rgba(230,192,127,.18), transparent 70%), linear-gradient(180deg, #d9d3c6, #e8e3d8 60%)";
return (
<div
className="flex min-h-[100dvh] w-full items-center justify-center overflow-x-clip px-4 pb-10 pt-40"
style={{ background: backdrop, backgroundColor: dark ? "#07080b" : "#e8e3d8" }}
>
<DartSendButton
theme={theme}
label={s.label}
sentLabel={s.sentLabel}
holdMs={s.holdMs}
onSend={() => {
/* demo only: nothing is sent anywhere */
}}
/>
</div>
);
}
















