Badge
A small status indicator or label component.
<script lang="ts">
import { Badge } from "coss-svelte";
</script>
<Badge>Badge</Badge>
Installation
Install the component package, shared coss-svelte theme, and Bits UI peer.
npm install coss-svelte @coss-svelte/theme bits-uiUsage
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.
| Prop | Type | Default | Description |
|---|---|---|---|
variant | string | "neutral" | Visual variant for the component. |
children : Snippet<[]>Inherits from Svelte <span> attributes.
Implementation Details
- Status
- Stable
- Foundation
- native
- Category
- Content & Display
- Particles
- 20