PhoenixDuskmoon.Component.Badge (PhoenixDuskmoon v7.2.1)
View SourceBadge component for status indicators and labels.
Examples
<.dm_badge>New</.dm_badge>
<.dm_badge color="success">Active</.dm_badge>
<.dm_badge color="error" size="lg">Error</.dm_badge>
<.dm_badge color="warning" outline>Warning</.dm_badge>
<.dm_badge color="info" ghost>Info</.dm_badge>Attributes
color- Badge color: primary, secondary, accent, info, success, warning, error, ghost (default: primary)size- Badge size: xs, sm, md, lg (default: md)outline- Show outline style (default: false)ghost- Show ghost style (default: false)class- Additional CSS classes
Slots
:inner_block- Badge content (required)
Summary
Functions
Attributes
color(:string) - Defaults to"primary". Must be one of"primary","secondary","accent","info","success","warning","error", or"ghost".size(:string) - Defaults to"md". Must be one of"xs","sm","md", or"lg".outline(:boolean) - Defaults tofalse.ghost(:boolean) - Defaults tofalse.class(:string) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)