Controls

Badge

Preview
Reduced motion

Simulates prefers-reduced-motion for the demo. Off follows your system setting.

Keyboard stepping

Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.

Badge
Draft18LivePendingFailed

Badge

A small tinted label whose counts roll like an odometer.

Installation

npx shadcn@latest add ikislay/pixel-ui/badge

How to use

import { Badge } from "@/components/ui/badge"
export function Demo({ unread }: { unread: number }) {
return <Badge tone="brand">{unread}</Badge>
}

Source Code

// Loading…

Props

Options you can pass to customize this component.

Prop
Type
Description
tone
neutralbrandsuccesswarningdanger

The tint.

dot
boolean

Shows a pinging dot before the text, for live status.

children
ReactNode

The label. A whole number rolls digit by digit when it changes.

className
string

Merged onto the root element.