Badge

Displays a badge component.

BadgeSecondaryDestructiveOutline

Variants

Use the variant prop to change the variant of the badge.

InvalidSecondaryDestructiveOutlineGhost

With Icon

VerifiedBookmark

With Spinner

DeletingGenerating

Link

Anatomy

Import all parts and piece them together.

use leptos::prelude::*;
use singlestage::badge::*;

#[component]
pub fn BadgeAnatomy() -> impl IntoView {
    view! { <Badge /> }
}

API Reference

Badge

Contains arbitrary badge content.

Custom Attributes
NameTypeDefaultDescription
invalidboolfalse

Toggle whether or not this badge appears invalid.

variantString"primary"

Specifies the style of badge to display.

Implements global attributes.