DaisyUIComponents.Badge (DaisyUIComponents v0.9.3)
View SourceBadge component
Summary
Functions
Renders a badge.
Examples
<.badge>Default</.badge>
<.badge primary class="gap-2">Primary</.badge>Attributes
class(:string) - Defaults tonil.color(:string) - Must be one of"neutral","primary","secondary","accent","info","success","warning", or"error".ghost(:boolean) - Defaults tofalse.outline(:boolean) - Defaults tofalse.size(:string) - Must be one of"xs","sm","md","lg", or"xl".- Global attributes are accepted.
Slots
inner_block
Returns the classes for a badge based on the provided parameters.
Parameters
- assigns - a map containing various options to customize the badge, including color, ghost, outline, size, and additional classes.
Description
Constructs a list of CSS classes for styling a badge.