A shadcn-style badge component built with Ark UI primitives.

Default

Installation

npx shadcn@latest add @ark-cn/badge

Usage

import * as Badge from "@/components/ui/badge"

Read exported parts in src/components/ui/badge.tsx and compose the primitive according to the Ark UI pattern for this component.

Examples

Default

Default

Outline

Outline

Secondary

Secondary

Destructive

Destructive

Info

Info

Success

Success

Warning

Warning

Error

Error

Small

Small

Large

Large

With Icon

With Icon

With Count

Notifications12

API reference

This component is an ark-cn composition. All props and DOM behavior are defined by Ark unless you see an ark-cn-only row below.

Badge

PropTypeDescription
variant?"default" | "secondary" | "destructive" | "outline" | "info" | "success" | "warning"Semantic color preset.
size?"default" | "sm" | "lg"Density/size preset.