View Source ZoonkWeb.Components.Badge (Zoonk v0.3.0-alpha)
Badge components.
Link to this section Summary
Functions
Renders a badge.
Link to this section Functions
Renders a badge.
examples
Examples
<.badge>1</.badge>
<.badge color={:alert}>2</.badge>
<.badge color={:success}>3</.badge>
<.badge color={:info}>4</.badge>
<.badge color={:warning}>5</.badge>
attributes
Attributes
color
(:atom
) - the background color. Defaults to:info
.icon
(:string
) (required) - name of the icon to add to the badge.class
(:string
) - the optional additional classes to add to the badge element. Defaults tonil
.- Global attributes are accepted.
slots
Slots
inner_block
(required) - the inner block that renders the badge content.