Copy Email Button
A pill showing your address: the glyph morphs to a check, the label rolls to “Copied”, a ring pulses out and a live region confirms. Falls back to a select hint if the clipboard is blocked.
Try it: Click to copy — watch the label roll.
Installation
Install with the shadcn CLI:
npx shadcn@latest add https://www.framekitui.live/r/copy-email-button.jsonOr, with the @framekit namespace registered: npx shadcn@latest add @framekit/copy-email-button. You can also copy the source into components/ui/copy-email-button.tsx (view on GitHub).
Usage
import { CopyEmailButton } from '@/components/ui/copy-email-button'Props
| Prop | Type | Default | Notes |
|---|---|---|---|
email | string | — | Address to copy. |
copiedLabel | string | 'Copied to clipboard' | Success label. |
resetAfter | number | 2200 | ms until idle again. |
onCopy | (email: string) => void | — | Fires after a successful copy. |
className | string | — | Extra classes merged onto the root. |
Dependencies
motionlucide-react
Related Portfolio components
- Availability Badge
A status pill with a motion language per state: “open” sends two staggered radar ripples, “limited” breathes slowly, “booked” holds still. Copy swaps on a vertical spring; optional live local clock.
- Social Dock
A floating link dock whose icons swell with a spring as the pointer (or keyboard focus) nears them, with a coloured halo and a springy label chip. Generic glyphs — bring your own.
- Portfolio Footer
A closing statement in giant display type — letters rise out of masks on scroll-in and a light follows the cursor across the glyphs — with a slow ribbon marquee, links and back-to-top.
- Contact Form Card
Validated on blur and submit with announced inline errors (shake + focus jump), optional async onSubmit with a sending morph, a drawn-check success scene with a particle burst, and a failure state…
- Section Spy Nav
Sticky in-page navigation that follows your reading position: a shared pill springs between links as sections cross the reading line, a hairline fills with overall progress, and clicks glide and…
- Client Logo Strip
A calm trust row of generated marks with a cursor-following spotlight that lights hairline borders; marks lift and spin a few degrees on hover/focus.