0
Sponsor

Buttons

A single email button component with primary, secondary, and text link styles, optional icons, and alignment.

One Buttons component covers every style. Switch the look with the variant prop, add an optional icon, and control placement with align.

Primary

Primary with Icon

Secondary

Secondary with Icon

Installation

$ pnpm dlx shadcn@latest add @emailcn/buttons

Usage

import { Buttons } from "@/components/emails/ui-elements/buttons/buttons";
<Buttons variant="primary" label="Get Started" href="https://example.com" />
<Buttons variant="secondary" icon="āžœ" label="Learn More" href="https://example.com/learn" />
<Buttons variant="text" label="Unsubscribe" href="https://example.com" />

API Reference

PropTypeDefaultDescription
variant"primary" | "secondary" | "text""primary"Button style
labelstring"Click Here"Button label
hrefstring"#"Button link URL
iconstring-Optional leading icon/glyph
align"left" | "center" | "right""center"Horizontal alignment
themeEmailThemeTokensdefaultThemeEmail theme styling