Badge

A small status indicator or label component.

Installation

Install the component package, shared coss-svelte theme, and Bits UI peer.

npm install coss-svelte @coss-svelte/theme bits-ui

Usage

Import the Svelte component exports directly from the package.

import { Badge } from "coss-svelte";

Anatomy

Badge exposes a single component export for the current implementation.

API Reference

Badge

A small status indicator or label component.

PropTypeDefaultDescription
variantstring"neutral"Visual variant for the component.
children : Snippet<[]>

Inherits from Svelte <span> attributes.

Implementation Details

Status
Stable
Foundation
native
Category
Content & Display
Particles
20