A small status/label pill.
Usage
shad_badge(
label = NULL,
variant = c("default", "secondary", "destructive", "outline"),
icon = NULL,
class = NULL,
...
)Arguments
- label
Badge text.
- variant
One of
"default","secondary","destructive","outline".- icon
Optional leading icon (a
shad_icon()name or a tag).- class
Extra CSS classes.
- ...
Extra attributes or child tags.
See also
Other shadshiny tier-1 components:
shad_alert(),
shad_aspect_ratio(),
shad_avatar(),
shad_breadcrumb(),
shad_button(),
shad_button_group(),
shad_card(),
shad_code_block(),
shad_empty(),
shad_item(),
shad_kbd_group(),
shad_label(),
shad_progress(),
shad_scroll_fade(),
shad_separator(),
shad_shimmer(),
shad_skeleton(),
shad_spinner(),
shad_table(),
shad_typography
Examples
shad_badge("New")
#> <span class="shad-badge shad-badge--default">New</span>
shad_badge("Verified", icon = "check")
#> <span class="shad-badge shad-badge--default">
#> <svg class="shad-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M20 6 9 17l-5-5"/></svg>
#> Verified
#> </span>