variant- Type
"default" | "secondary" | "outline" | "success" | "warning" | "info" | "destructive"- Default
"default"- Description
- Visual style.
Search for a command to run...
Components / Display
சின்னக்குறி
Badges are compact labels that communicate status, category, or count. They are non-interactive by default.
சின்னக்குறிகள் நிலை, வகை அல்லது எண்ணிக்கையை தெரிவிக்கும் சிறிய லேபிள்கள்.
3 parts documented for implementation and review.
<span>Pill-shaped inline wrapper with border and tinted background. Height is fixed (h-5 for default). Padding is tight (px-2 py-0.5). The variant prop controls the color scheme — default, secondary, outline, success, warning, info, or destructive.
Short status or category text. Maximum 2-3 words — never a full sentence. Font size is 12px (text-xs) with medium weight. For Tamil labels, apply font-tamil. Examples: 'செயலில்' (Active), 'நிலுவையில்' (Pending), 'முடிந்தது' (Done). For bilingual, use 'செயலில் / Active'.
svgSmall 12×12px icon placed before the label for added semantic context. Use sparingly — only when the icon meaningfully reinforces the status (a check for 'Done', a clock for 'Pending'). Sized smaller than button icons to match badge density.
variant"default" | "secondary" | "outline" | "success" | "warning" | "info" | "destructive""default"classNamestring| Prop | Type | Default | Description |
|---|---|---|---|
variant | "default" | "secondary" | "outline" | "success" | "warning" | "info" | "destructive" | "default" | Visual style. |
className | string | - | Merge additional Tailwind classes. |
Badge text should be short and scannable; use semantic color tokens so status is immediately clear.
சின்னக்குறி உரை சுருக்கமாகவும் பொருத்தமான நிறத்திலும் இருக்க வேண்டும்.
A full sentence inside a badge overflows the layout and is impossible to scan at a glance.
முழு வாக்கியம் உள்ள சின்னக்குறி வடிவமைப்பை சிதைத்து விரைவாக படிக்க முடியாமல் போகும்.
Showing '99+' keeps the badge compact and avoids layout overflow for large counts.
100, 1000 என்று காட்டுவதை விட 99+ காட்டுவது சின்னக்குறியை சிறிதாக வைக்கும்.
Color alone is not accessible — always pair the badge with visible text to communicate status.
நிறம் மட்டுமே அணுகல் தன்மை அளிக்காது — பொருத்தமான உரையுடன் இணைக்கவும்.