Skip to content
loseta

Components / Surfaces

Badge

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

Status stable
Badge
<span class="badge">Badge</span>

Installation

pnpm dlx loseta add badge
npx loseta add badge

Examples

Variants

Default Secondary Outline Destructive Ghost Link
<div style="display: flex; flex-wrap: wrap; gap: 0.5rem">
  <span class="badge">Default</span>
  <span class="badge" data-variant="secondary">Secondary</span>
  <span class="badge" data-variant="outline">Outline</span>
  <span class="badge" data-variant="destructive">Destructive</span>
  <span class="badge" data-variant="ghost">Ghost</span>
  <span class="badge" data-variant="link">Link</span>
</div>

Files

components/badge.cssbase
styles/nova/badge.cssstyle

Install contract

The CLI writes the base file under components/, the visual file for the selected style under styles/<name>/, and any primitive dependency underprimitives/. The generated index.css imports them in the right layer order.

← Back to components

loseta is MIT licensed. Built with native CSS, no runtime. Inspired byshadcn/ui.