A link to copy, people to invite, and the access everyone has.
The prompt36,126 characters
Add the "Share" 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 Share, from the source below.
2. Install what it needs: npm i framer-motion lucide-react
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
--danger
--danger-rgb
--font-ui
--ink
--ink-2
--ink-3
--ink-4
--ink-5
--ink-rgb
--on-ink
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.
5. AVATARS is a stub
— notboring's own pictures are not licensed to
travel. Point it at this project's images, or
leave the placeholder and tell me.
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.
--- Share.tsx ---
import { useEffect, useRef, useState } from "react";
import { AnimatePresence, motion } from "framer-motion";
import { Check, ChevronDown, Link, X } from "lucide-react";
/* ══ Share ════════════════════════════════════════════════
A link to copy, people to invite, and the access everyone
has — the three questions a share sheet exists to answer,
on one card, in that order.
THE LIST IS THE ANSWER. There is no "3 people" count and no
"Invited!" toast: an address you invite becomes a row with
a face on it, and a row you remove closes up under the
pointer. The card reports who has this by showing them,
which is what a person opening it wants to know.
THE CARD NEVER CHANGES HEIGHT. It is drawn at the tallest
case — four people — and the rows arrive and leave INSIDE
that room, so nothing beneath the list moves when the list
does. A share sheet that jumps every time somebody is added
is a sheet you learn to press carefully.
Rows are dealt in by height rather than by opacity alone,
because a row appearing at full size shoves the rows under
it a whole step in one frame; a row opening from nothing
The rest — the source and its comments — is what you are buying.