Docs
Badge

Badge

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

Loading...

Installation

	npx svell@latest add badge

Usage

	<script lang="ts">
  import { Badge } from "$lib/components/ui/badge";
</script>
	<Badge variant="outline">Badge</Badge>

You can use the badgeVariants helper to create a link that looks like a badge.

	<script lang="ts">
  import { badgeVariants } from "$lib/components/ui/badge";
</script>
 
<a href="/dashboard" class={badgeVariants({ variant: "outline" })}>Badge</a>

Examples

Default

Loading...

Secondary

Loading...

Outline

Loading...

Destructive

Loading...

Built & designed by shadcn. Ported to Svelte by netronk. The source code is available on GitHub.