LineOne's badges: filled, glowing, soft, outlined or bare text, with a dot, an icon or a remove button.
<.badge>Default</.badge>
<.badge color="success" shape="pill">Paid</.badge>
<.badge color="primary" variant="soft" dot>Online</.badge>
<.badge color="error" variant="outline" shape="pill">Error</.badge>
<.badge on_remove={JS.hide()}>Filter</.badge>
<.badge color="success" variant="soft" size="sm">UI/UX</.badge>
<.badge color="white" variant="outline" shape="pill">Tag</.badge>
Summary
Functions
Renders a badge.
Functions
Renders a badge.
<.badge color="success" variant="soft" shape="pill" dot>Active</.badge>Attributes
color(:string) -whiteis for badges on colored or gradient cards:variant="outline"is a white outline,softa translucent white chip. Defaults to"neutral". Must be one of"neutral","primary","secondary","info","success","warning","error","dark","light", or"white".variant(:string) -flatis only the colored text, as LineOne's badges with dots. Defaults to"solid". Must be one of"solid","glow","soft","outline", or"flat".size(:string) - Fixed heights as LineOne's compact badges:xsh-4.5,smh-5,mdh-5.5 with larger text,lgh-6. Without it the badge keeps its padding-based height. Defaults tonil. Must be one ofnil,"xs","sm","md", or"lg".shape(:string) - Defaults to"rounded". Must be one of"rounded","pill", or"square".dot(:boolean) - A dot in the badge's color before the content. Defaults tofalse.on_remove(:any) - An event name or aJScommand: adds a small round remove button after the content. The event's payload is%{"id" => id}. Defaults tonil.id(:string) - Defaults tonil.target(:any) - Thephx-targetofon_removewhen it is an event name. Defaults tonil.remove_label(:string) - Defaults to"Remove".class(:any) - Defaults tonil.- Global attributes are accepted.
Slots
inner_block(required)