Badge

A small label for status and counts: neutral, accent, success, warning, danger.

DraftNewAcceptedUnder reviewFailed

Features

  • Neutral, accent, success, warning and danger; an optional dot.

Use it for

  • Status, counts, tags.

Installation

  1. Get runets.
    git clone https://github.com/ziyam-khan/runets
  2. Copy these files into your project, keeping their folders.
  3. Install what they use.
    pnpm add react
  4. Load the styles once. Bring your own base tokens, or use runets’ default theme.
    import 'runets/styles/theme.css'
    import 'runets/styles/kit.css'

Usage

import { Badge } from 'runets'

<Badge tone="success" dot>Accepted</Badge>

API

PropTypeWhat it does
tonestringColour.
dotbooleanLeading dot.

Accessibility

Source

The code is in src/kit/controls.tsx in runets, MIT licensed.