Skip to content

Component Badge

MeowLynxSea edited this page Jun 18, 2026 · 4 revisions

Badge

A small status or count chip.

use yororen_ui::headless::badge::{badge, BadgeVariant};

badge("new", "New", cx)
    .variant(BadgeVariant::Accent)
    .render(cx)

Props

Method Purpose
variant(v) BadgeVariant::Accent / Neutral (default).
icon(source) Leading IconSource.
has_custom_bg(v) Tells the renderer the caller has overridden the background.

Text is set at construction; there is no .text(...) builder. .render(cx) returns Stateful<Div>. No state entity.

See also: Tag, Avatar.

Clone this wiki locally