mirror of
https://github.com/huntabyte/shadcn-svelte.git
synced 2026-09-14 19:33:46 +08:00
0a17af2ba7
Co-authored-by: AdrianGonz97 <31664583+AdrianGonz97@users.noreply.github.com>
1.3 KiB
1.3 KiB
title, description, links
| title | description | links | ||
|---|---|---|---|---|
| Badge | Displays a badge or a component that looks like a badge. |
|
Installation
{#snippet cli()} {/snippet} {#snippet manual()}Copy and paste the component source files linked at the top of this page into your project.
{/snippet}Usage
<script lang="ts">
import { Badge } from "$lib/components/ui/badge/index.js";
</script>
<Badge variant="outline">Badge</Badge>
Link
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/index.js";
</script>
<a href="/dashboard" class={badgeVariants({ variant: "outline" })}>Badge</a>