NewsletterSlotTrigger
ImplementedNewsletter slot trigger (ADR-069 / plan T6, decision D17): a tiny client component that renders a real <button type="button"> and dispatches the DOM CustomEvent 'ep:newsletter-open' on window (detail: { source }). It bridges the server/client boundary for server-rendered slots such as FooterStub, where a function prop cannot cross — the consumer listens for the event and opens its modal. Ships no hardcoded copy: the CTA label and the accessible name are props.
components/molecules/newsletter/NewsletterSlotTrigger.tsxProps
NewsletterSlotTrigger
ctaLabelstring—Visible button label.
ariaLabelstring—Accessible name for the button — compose it from consumer copy when the surrounding slot already shows a heading.
sourcestring"footer"Source tag carried by the dispatched event.
classNamestring—Additional CSS classes on the button.
<NewsletterSlotTrigger />Accessibility
behavior
2 rulesARIA
1 ruleUsage
Import
import { NewsletterSlotTrigger } from "@epasslive/design-system"Example 1
<NewsletterSlotTrigger ctaLabel="Subscribe" ariaLabel="Newsletter" />Anti-patterns
— Do not hardcode data in molecules
— Do not pass callback props across the server/client boundary — dispatch a DOM event instead