Search documentation of phoenix_kit

# PhoenixKitWeb.Components.Core.MessageTagBadge (phoenix_kit v1.6.19)

View Source

Provides message tag badge component for email system.

Displays email type tag from message_tags JSONB field. Used in email list view to show categorization tags.

# Summary

## Functions

message_tag_badge(assigns)

Renders a message tag badge if email_type exists in message_tags.

# Functions

# message_tag_badge(assigns)

Renders a message tag badge if email_type exists in message_tags.

## Attributes

- `message_tags` - JSONB map with email metadata (required)
- `class` - Additional CSS classes (default: "badge-secondary badge-xs")

## Examples

    <.message_tag_badge message_tags={%{"email_type" => "marketing"}} />
    <.message_tag_badge message_tags={log.message_tags} class="badge-primary badge-sm" />
    <.message_tag_badge message_tags={nil} />  <%!-- No badge rendered --%>

## Attributes

- `message_tags` (`:map`) (required)
- `class` (`:string`) - Defaults to `"badge-secondary badge-xs"`.