PhiaUi.Components.BadgeGroup (phia_ui v0.1.17)

Copy Markdown View Source

Badge + text description combo component.

Renders a pill-shaped container with a badge element on the left and description text on the right, separated by a subtle visual boundary. Commonly seen in marketing UIs as "New feature — Check out our latest update".

Variants

VariantVisual
:defaultMuted background with subtle border
:outlineBorder only, transparent background
:ghostNo border, subtle background

Examples

<.badge_group>
  <:badge>New</:badge>
  Check out our latest feature
</.badge_group>

<.badge_group variant={:outline} size={:lg}>
  <:badge>v2.0</:badge>
  Major release with breaking changes
</.badge_group>

Summary

Functions

badge_group(assigns)

Attributes

  • variant (:atom) - Defaults to :default. Must be one of :default, :outline, or :ghost.
  • size (:atom) - Defaults to :default. Must be one of :sm, :default, or :lg.
  • class (:string) - Defaults to nil.
  • Global attributes are accepted.

Slots

  • badge (required) - Badge pill content (left side).
  • inner_block (required) - Description text (right side).