Documentation Index
Fetch the complete documentation index at: https://mintlify.com/aurelienbobenrieth/gadget/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheBadge component displays small, pill-shaped labels with semantic color variants. Useful for tags, status indicators, and metadata labels.
Import
Basic Usage
Variants
The Badge component supports five color variants:- Default
- Accent
- Success
- Destructive
- Warning
Sizes
Two size options are available:sm- Padding: 8px/2px (2/0.5), Font: 10px, Tight leadingmd- Padding: 10px/2px (2.5/0.5), Font: 12px (xs) - Default
Props
The color variant of the badge.
The size of the badge.
Additional CSS classes to apply.
HTMLAttributes<HTMLSpanElement>, so all standard span attributes are supported.
Design Details
- Rounded-full shape (pill-shaped)
- Border with matching color variant
- Smooth color transitions
- Font: sans-serif family, medium weight
- Inline-flex layout for proper alignment
Examples
Status Indicators
With Icons
Small Size for Compact UI
Component Definition
Location:packages/gadget-ui/src/components/badge.tsx:28
The Badge is a simple functional component that renders a <span> element.