Email Preview Frame

Inbox style preview frame showing the sender and subject above the rendered email body. Handy for template galleries and email settings screens.

src/registry/ui/email-preview-frame.tsx/r/email-preview-frame.json

Installation#

bash
npx shadcn@latest add @minidev/email-preview-frame

MiniDev UI is in the shadcn registry directory, so the short form works with no setup. Older CLI versions can use the full URL: npx shadcn@latest add https://ui.minidev.pro/r/email-preview-frame.json

Usage#

tsx
import { EmailPreviewFrame } from "@/components/ui/email-preview-frame"

export function Example() {
  return (
    <EmailPreviewFrame subject="Verify your email">
      <EmailLayout>
        <EmailHeader />
        <div className="space-y-3 px-6 py-6">
          <h1 className="text-xl font-medium text-fg">Confirm it is you</h1>
          <p className="text-sm text-fg-muted">Click below to verify aman@minidev.pro.</p>
          <EmailButton>Verify email</EmailButton>
        </div>
        <EmailCard title="Did not request this?">Ignore this message — your account stays unchanged.</EmailCard>
        <EmailFooter />
      </EmailLayout>
    </EmailPreviewFrame>
  )
}

API reference#

EmailPreviewFrame props
PropTypeDefault
subject*string-
fromstring"hello@minidev.pro"
children*React.ReactNode-
classNamestring-

* required

Examples#

All email templates