Skip to content
Eskais UI

Data

Badge

Presentational badge: tone (neutral, info, success, warning, destructive) for meaning, variant (default, secondary, outline) for an untoned look. Tone values passed as variant still work but are deprecated.

Example

DefaultSecondaryOutlineDraftPreviewReadyBuildingFailedDesign

Installation

npx shadcn@latest add @eskais/badge
Brings alongtone
npm packagesclass-variance-authority@0.7.1

Usage

Import
import { Badge, badgeVariants } from "@/components/ui/badge"

API reference

Badge

PropTypeDefault
toneWhat the badge means; takes precedence over `variant`.Tone–
variantThe look of a badge without a tone. `success`, `warning`, `info` and `destructive` still work but are deprecated: use `tone`."default" | "secondary" | "outline" | DeprecatedBadgeTone–

Also takes <span> attributes and render.

Other exports

badgeVariantstype BadgeProps

Accessibility

  • Presentational text: the tone adds colour, so keep the word meaningful.

Agent actions

Runs agent.snapshot() from @ui-sdk/react/agent on the live preview above.