Noora.Badge
(noora v0.76.0)
Copy Markdown
Renders a customizable badge component with various styles, colors, sizes, and optional icons or status indicators.
Summary
Functions
Attributes
style(:string) - The style of the badge. Defaults to"fill". Must be one of"fill", or"light-fill".label(:string) (required) - The label of the badge.color(:string) - The color of the badge. Defaults to"neutral". Must be one of"neutral","destructive","warning","attention","success","information","focus","primary", or"secondary".size(:string) - The size of the badge. Defaults to"small". Must be one of"small", or"large".disabled(:boolean) - Whether the badge is disabled. Overrides thecolorattribute. Defaults tofalse.dot(:boolean) - Whether to render a dot on the side of the label. Defaults tofalse.icon_only(:boolean) - Whether the badge is icon only. Defaults tofalse.- Global attributes are accepted.
Slots
icon- The icon to render next to the label. Overrides thedotattribute.
Attributes
type(:string) - Whether to render the prefix as a dot, or a status-specific icon. Defaults to"icon". Must be one of"icon", or"dot".status(:string) (required) - The status of the badge. Must be one of"success","error","warning","attention","disabled", or"in_progress".label(:string) (required) - The label of the badge.- Global attributes are accepted.