Components

Displays a badge or a component that looks like a badge.

Badge

Installation

npm install @mijn-ui/react-badge

Usage

import { Badge } from "@mijn-ui/react-badge"
<Badge variant="outlined">Badge</Badge>

Examples

Variants

Badge
filled
Badge
outlined
Badge
subtle
Badge
ghost
Badge
light

Colors

Badge
default
Badge
brand
Badge
secondary
Badge
success
Badge
warning
Badge
danger
Badge
inverse

Sizes

Badge
sm
Badge
md
Badge
lg

Radius

Badge
default
Badge
pill
Badge
full

API Reference

Standard element attributes are forwarded to the underlying component in addition to the props below.

PropTypeDefaultDescription
variant"filled" | "outlined" | "subtle" | "ghost" | "light""filled"Visual style of the badge.
color"default" | "brand" | "secondary" | "success" | "warning" | "danger" | "inverse""default"Color scheme of the badge.
size"sm" | "md" | "lg""md"Size of the badge.
radius"default" | "pill" | "full""default"Border radius of the badge.
unstyledbooleanfalseOpt out of the default styles to fully customize the component.
classNamesobjectOverride classes per slot (see Style Slots below).
classNamestringAdditional classes for the root element.

Badge Style Slots

Slot NameTargeted ComponentPurpose
baseBadgeStyles the badge component.