Newsletter Inline Success
A single-line signup whose submit button shrinks into a spinner, then a green check, while the field collapses around a confirmation message.
newsletterformmorphsuccesslayout
Installation
Run the shadcn CLI in a project with Tailwind CSS. The component lands in components/pixelpapa/newsletter-inline-success.tsx.
$pnpm dlx shadcn@latest add "https://pixelpapa.com/r/newsletter-inline-success.json"Manual install+
1. Install the dependencies.
$pnpm add lucide-react motion2. Copy the code from the Code tab above into your project. It imports the cn helper from @/lib/utils, which every shadcn project already has.
Build it with AI
Prefer to let an agent do the wiring? Copy this prompt, describe where the component should go, and paste.
AI prompt
Paste into Claude, Cursor, v0 or Lovable
Add the "Newsletter Inline Success" component from PixelPapa UI to this project. What it is: A single-line signup whose submit button shrinks into a spinner, then a green check, while the field collapses around a confirmation message. Category: Contact & Newsletter. Depends on: lucide-react, motion. 1. Install it with the shadcn CLI: npx shadcn@latest add "https://pixelpapa.com/r/newsletter-inline-success.json" (If the CLI is unavailable, fetch that URL, write files[0].content to components/pixelpapa/newsletter-inline-success.tsx and install the listed dependencies.) 2. Import it from "@/components/pixelpapa/newsletter-inline-success" and place it where I describe below. 3. Keep its animation timings and accessibility attributes. Replace the demo copy and data with content that fits my product, and use my existing theme tokens (bg-background, text-foreground, bg-primary, border-border) rather than hard-coded colours. Where to use it: <describe the page and position here>
More contact & newsletter
- Contact Booking SlotsA meeting scheduler card: pick a day from a strip, then a time slot that highlights with a shared-layout pill, switch 12/24-hour format and confirm into a summary.
- Contact Cards ChannelsThree contact channel cards, each with its own live detail: a copy-to-clipboard email, a chat thread with a typing indicator and a voice line with moving level bars.
- Contact Map OfficeA dotted SVG world map with pulsing office pins linked by animated arcs; the office list and the pins select each other and show live local time.
- Contact Split FormTwo-column contact section whose form has floating labels, inline validation that slides in on blur, a shake on invalid submit and a drawn-check success state.
- Newsletter Card PerksA signup card with a staggered perks list on one side and a fanned stack of past issues that spreads apart on hover on the other.