Badge component for dashboard tab indicators.
Renders various badge types with support for:
- Count badges (numeric)
- Dot indicators
- Status badges
- "New" indicators
- Custom text badges
- Pulse and other animations
Summary
Functions
Renders a compound badge with multiple colored segments.
Renders a count badge with optional max value display.
Renders a dashboard badge.
Renders a dot indicator badge.
Renders a "New" indicator badge.
Renders a presence indicator showing user count.
Renders a status badge with value and color.
Renders a custom text badge.
Functions
Renders a compound badge with multiple colored segments.
Supports three styles:
:text- Colored text values with separator (default):blocks- Colored background pills side by side:dots- Colored dots with numbers
Attributes
badge(:any) (required)class(:string) - Defaults to"".
Renders a count badge with optional max value display.
Attributes
badge(:any) (required)class(:string) - Defaults to"".
Renders a dashboard badge.
Attributes
badge- The Badge struct or nilclass- Additional CSS classes
Examples
<.dashboard_badge badge={@tab.badge} />
<.dashboard_badge badge={Badge.count(5)} />Attributes
badge(:any) - Defaults tonil.class(:string) - Defaults to"".
Renders a dot indicator badge.
Attributes
badge(:any) (required)class(:string) - Defaults to"".
Renders a "New" indicator badge.
Attributes
badge(:any) (required)class(:string) - Defaults to"".
Renders a presence indicator showing user count.
Attributes
count(:integer) - Defaults to0.show_text(:boolean) - Defaults tofalse.class(:string) - Defaults to"".
Renders a status badge with value and color.
Attributes
badge(:any) (required)class(:string) - Defaults to"".
Renders a custom text badge.
Attributes
badge(:any) (required)class(:string) - Defaults to"".