Swirski UI

Feedback

Badge

A compact high-contrast label for statuses, tags and small interface signals.

Component

01

Request Changes

Import

import { Badge } from "@swirski/ui";

Playground

3 controls
New drop

Controls

Usage

<Badge
  tone="yellow"
  size="md"
>
  New drop
</Badge>

Props

6 generated
PropTypeDefaultNotes
asChildbooleanfalseGenerated from BadgeProps.
childrenReactNode-Badge text or inline content.
size'sm' | 'md' | 'lg'"md"Controls the compact badge padding and text size.
tone'blue' | 'yellow' | 'red' | 'white' | 'black'"yellow"Applies one of the Swirski status color treatments.
variant'solid' | 'outline' | 'soft'"solid"Generated from BadgeProps.
withShadowbooleantrueGenerated from BadgeProps.
classNamestring-Adds classes to the root span.
...spanPropsHTMLAttributes<HTMLSpanElement>-Forwarded to the root span.
Previous: DiagonalLinesNext: Alert