Documentation Upgrade
Start here
CwChip is for compact labels, filters, and statuses. The API is intentionally small: pick a tone, variant, size, and optionally let the user dismiss it.
Copy-paste examples
These snippets intentionally show the full public API surface the live demo relies on.
Static status chips
Use tone and variant to control how much the chip stands out.
<CwChip tone="success" variant="soft" label="Online" />
<CwChip tone="warning" variant="outline" label="Review needed" />
<CwChip tone="danger" variant="solid" size="sm" label="Alarm" />
Dismissible filter chip
Useful for removable filter tokens or selected facets.
<script lang="ts">
let filters = $state(['North greenhouse', 'Offline devices']);
</script>
{#each filters as filter}
<CwChip
label={filter}
dismissible
ondismiss={() => (filters = filters.filter((item) => item !== filter))}
/>
{/each}
<CwChip label="Locked filter" dismissible disabled />