ValyroUI Русская версия

Badge

Status labels and tags. Free, MIT · Basics › Labels and tooltips

Installation

npx valyro-cli@latest add badge
npx shadcn@latest add https://valyro.xyz/r/badge.json
npm install valyro-ui

import 'valyro-ui/styles.css';
import { Badge } from 'valyro-ui';

Props

PropTypeDefault
colorBadgeColor'gray'Hue of the fill, text and dot; inverted uses the page foreground as the fill in every variant.
variant'subtle' | 'solid' | 'outline''subtle'subtle tinted fill, solid saturated fill with contrasting text, outline transparent with a tinted border.
size'sm' | 'md' | 'lg''md'Badge height, padding and text size.
iconReactNodeIcon before the label.
dotbooleanfalseLeading status dot in the badge color.

Related components

Previous: Copy to Clipboard · Next: Avatar · All Basics