Skip to contentKino
Skip to Content

Badge

A status, a count or a tag, with the type and corner of the Tag input's chips. A new label or variant crossfades, and a count rolls to its new value inside an Animated number.

npx shadcn add https://kinoui.com/r/badge.json
Share on

Examples

What’s new in Kino

The last six releases
New
Search every notebook

12 Nov

Stable
Shared notebooks leave beta

8 Nov

Beta
Offline edits on iPad

4 Nov

Labs
Search your handwriting

1 Nov

Deprecated
Export to the old PDF layout

28 Oct

Breaking
API v1 switches off on 1 Dec

21 Oct

Variants

Six variants: default for what should be seen first, secondary for a quiet label, outline for a lighter one, and success, warning and destructive for what went well, what needs a look and what went wrong. secondary and outline take their colour from the text around them, so they read the same in a muted list or a picked tab.

Harbour & Pine

NW-1187

$1,280.00
Paid
Lumen Dental

NW-1203

$865.50
Due
Okafor Studio

NW-1219

$2,410.00
Overdue

Icons

An icon goes before the label and is sized for it. Keep the word: a colour or an icon alone doesn’t say the status to everyone.

Installation

npx shadcn@latest add https://kinoui.com/r/badge.json
Files
lib/refs.tslib/reduce-motion.tslib/resize.tslib/swap.tsxcomponents/kino/badge.tsx
Packages
@base-ui/reactclass-variance-authority

New to Kino? Installation covers what your project needs first and the @kino namespace.

API reference

Props

PropTypeDefaultDescription
variant'default''secondary''outline''success''warning''destructive''default'How much it stands out. A change of variant crossfades its colours.
renderReactElement(props, state) => ReactElementNoneThe element it renders as, such as an <a>.

Data attributes

AttributeOnDescription
data-variantBadgeIts variant.

Accessibility

  • A badge is text, read where it sits. Name what a bare number counts with screen-reader text, such as <span className='sr-only'> unread</span>.
  • A status never relies on colour alone: the word is always there, and an icon beside it is hidden from screen readers.
  • A badge that is a link takes the controls’ focus ring. In forced colours it keeps its border, so its edge still shows.
  • A count in an AnimatedNumber is read once at its new value, never through the numbers between.