Newsletter Form
Email sign-up form with inline validation and loading, success and error states. Pill-shaped inline field, stacked form or titled card.
Installation
pnpm dlx shadcn@latest add @portfolio-kit/newsletter-formFirst time? Add the @portfolio-kit registry to components.json
components.json
{
"registries": {
"@portfolio-kit": "https://www.parthjadhav.com/products/portfolio-kit/r/{name}.json"
}
}Usage
Examples
Card
A card with a heading and a short pitch, for the end of an article or a newsletter page.
Error Handling
The stacked layout with a visible label, plus server errors: throw from onSubscribe and the message is shown and announced inline. Submit an address starting with “taken” to see it.
In a Section
A full-width sign-up band above the footer: text on the left, form on the right, stacked on phones.