Search documentation of phoenix_kit

# PhoenixKitWeb.Components.Core.EmailStatusBadge (phoenix_kit v1.7.87)

Copy Markdown View Source

Provides email status badge components for email tracking system.

Supports all email lifecycle statuses with appropriate color coding. Follows daisyUI badge styling conventions.

## Summary

### Functions

email_status_badge(assigns)

Renders an email status badge with appropriate styling.

## Functions

# email_status_badge(assigns)

Renders an email status badge with appropriate styling.

## Attributes

- `status` - Email status string (required)
- `size` - Badge size: :xs, :sm, :md, :lg (default: :sm)
- `class` - Additional CSS classes

## Supported Statuses

- `queued` - Email queued for sending (ghost/gray)
- `sent` - Email sent to provider (info/blue)
- `delivered` - Email delivered successfully (success/green)
- `opened` - Email opened by recipient (primary)
- `clicked` - Links clicked (secondary)
- `bounced` - General bounce (error/red)
- `hard_bounced` - Permanent bounce (error/red)
- `soft_bounced` - Temporary bounce (warning/yellow)
- `rejected` - Rejected by provider (error/red)
- `delayed` - Delivery delayed (warning/yellow)
- `complaint` - Spam complaint (error/red)
- `failed` - Send failed (error/red)

## Examples

    <.email_status_badge status="delivered" />
    <.email_status_badge status="hard_bounced" size={:md} />
    <.email_status_badge status={@log.status} class="ml-2" />

## Attributes

- `status` (`:string`) (required)
- `size` (`:atom`) - Defaults to `:sm`. Must be one of `:xs`, `:sm`, `:md`, or `:lg`.
- `class` (`:string`) - Defaults to `""`.