Tapas UI
Esc
  • IntroductionGetting startedWhat Tapas UI is and where to start.
  • InstallationGetting startedSet up shadcn/ui and add your first section.
  • CLI & AI agentsGetting startedThe shadcn CLI, the @tapas namespace, the MCP server and AI prompts.
  • TemplatesGetting startedWhole pages built from sections, installed with one command.
  • Demo sitesGetting startedThree fictional sites built only from Tapas sections.
  • ThemingCustomizationHow sections pick up your colors and radius.
  • ColorsCustomizationEvery CSS variable sections read, what it is for and where it is used.
  • Dark modeCustomizationSections follow your .dark variables.
  • MotionCustomizationPlain and motion versions, reduced motion and pause controls.
  • AccessibilityCustomizationWhat every section guarantees.
  • Waitlist formsGuidesPost signups to your own API route and store them.
  • Checkout linksGuidesPoint pricing buttons at Stripe payment links or any URL.
Menu
Browse the docs

DocsMarketing

Newsletter

Newsletter signup band; a plain HTML form that works without JavaScript.

Preview

Version
Preview theme color
More themes

With onSubmit, the form morphs into a success message; a live region announces the result. With reduced motion turned on, it renders the plain layout.

One email a month

New sections and templates, nothing else. Sample copy.

Unsubscribe anytime.

One email a month

New sections and templates, nothing else. Sample copy.

Unsubscribe anytime.

Installation

Run this in a project that already uses shadcn/ui. It adds the component and anything it needs; the motion version also adds the plain one and the motion package.

Usage

import { Newsletter } from "@/components/custom/newsletter";

<Newsletter title="One email a month" action="/api/subscribe" note="Unsubscribe anytime." />
import { NewsletterMotion } from "@/components/custom/newsletter/newsletter-motion";

<NewsletterMotion title="One email a month" action="/api/subscribe" onSubmit={subscribe} />

Props

PropTypeDefaultDescription
title* (required)string–Heading (h2).
action* (required)string–Where the form posts.
method"post" | "get""post"Form method.
inputLabelstring"Email address"Field label (visually hidden).
buttonLabelstring"Subscribe"Button text.
notestring–Small print.
...propsReact.ComponentProps<"section">–Any other section attribute (id, aria-*, data-*, ref) goes to the root element.
PropTypeDefaultDescription
title* (required)string–Heading (h2).
action* (required)string–Where the form posts.
method"post" | "get""post"Form method.
inputLabelstring"Email address"Field label (visually hidden).
buttonLabelstring"Subscribe"Button text.
notestring–Small print.
...propsReact.ComponentProps<"section">–Any other section attribute (id, aria-*, data-*, ref) goes to the root element.
onSubmit(email: string) => Promise<void>–Handle the signup yourself; shows sending, success and error states.
successMessagestring"Thanks, you're subscribed."Shown after onSubmit resolves.

Accessibility

  • A labelled email field with autocomplete; the form works without JavaScript.
  • The motion version follows the visitor's reduced-motion setting and never hides content before it animates.