A bar that becomes the check.
The prompt17,376 characters
Add the "Progress" component from notboring to my project.
It is licensed for use in my projects — notboring.dev/license. Please:
1. Create the component at a sensible path for this
project, named Progress, from the source below.
2. Install what it needs: npm i framer-motion
3. Add the CSS to the project's stylesheet.
4. THE PART THAT NEEDS YOUR JUDGMENT. The CSS reads
these custom properties and does not define them:
--card
--card-rgb
--font-ui
--ink
--ink-3
--ink-4
--ink-rgb
They are notboring's design tokens. Map each one to
whatever this project already uses for the same
job — its own ink, ground, surface and UI font —
rather than defining them as new globals. If the
project has no equivalent, define it locally on
the component's own root so nothing leaks out.
Anything ending -rgb wants three bare numbers,
because the CSS builds rgba() from it.
Keep the comments. They say why the numbers are what
they are, and they are most of what makes this worth
copying rather than rewriting.
--- Progress.tsx ---
import { useEffect, useRef, useState } from "react";
import { animate, motion, useMotionValue, useMotionValueEvent, useTransform } from "framer-motion";
/* ══ Progress ═════════════════════════════════════════════
An upload, and the bar that becomes the check.
AN UPLOAD IS NOT A CLOCK. The obvious build runs a bar
from 0 to 100 at one speed, and it is a lie about what an
upload is: a real transfer bursts and stalls, and a bar
that moves evenly is a bar that has stopped reporting.
So this one has a SHAPE — a table of segments, each with
a destination and a duration, played in order. It leaps,
it hangs at 61 for most of a second, it finishes in a
rush. That shape is the whole difference between a
progress bar and a loading animation.
THE WASH WIPES THE WORDS. The ink is the pill's own body
growing from the left edge, and the label sits in its
path. Rather than fading the words out or floating them
above, the label is painted twice: once in ink on the
card, once in card on the ink, and the second copy lives
inside the wash and is clipped by it. The advancing edge
inverts each letter as it reaches it. Nothing is
recolored, and there is no moment where the words are
The rest — the source and its comments — is what you are buying.