Skip to content

🐸 Rybbit - open-source and privacy-friendly alternative to Google Analytics that is 10x more intuitive.

1.5 KB
Raw Blame

category: Data display

Small inline status label: 12px medium text, 2px/6px padding, 2.8px radius (rounded-md), inline-flex. One export, Badge, with a variant prop; it renders a div, so it is not clickable β€” wrap it or use a Button size="xs" when it must act.

Variants:

  • default β€” neutral-800 fill, neutral-100 text. Plan names, generic labels ("Pro").
  • secondary β€” one notch quieter (panel fill, neutral-300 text). Counts and low-emphasis tags.
  • success β€” emerald 20% tint, emerald-400 text. "Tracking", "Enabled", "Verified".
  • warning β€” yellow tint. "No data", "Paused", thresholds.
  • destructive β€” red tint. "Bot", "Blocked", "Failed".
  • info β€” blue tint. "Beta", "New", informational only (never for data-series color).
  • outline β€” neutral-700 border, transparent fill. Environment / category tags.
  • ghost β€” no border or fill. Inline keywords.

Conventions: colored variants are semantic, so use them only when the state has that meaning β€” a status column is the canonical place. Put a 12px lucide icon (className="h-3 w-3") as the first child and add gap-1; add tabular-nums for counts and font-mono for paths. Badges do not change size; if you need a larger pill, it is a Button.

<Badge variant="success">Tracking</Badge>
<Badge variant="warning">No data</Badge>
<Badge variant="destructive" className="gap-1"><Bot className="h-3 w-3" /> Bot</Badge>
<Badge variant="secondary" className="tabular-nums">2,140</Badge>