Button

A button with variants, sizes, and optional link rendering via href.

Loading preview…

Installation

Usage

Use the button for primary actions, secondary actions, links, and icon-only controls. Pass href to render as an anchor, or set newTab to open the link in a new tab.

1<script lang="ts">
2	import { Button } from '~/components/button';
3</script>
4
5<div class="flex items-center gap-3">
6	<Button variant="default">Save</Button>
7	<Button variant="outline">Cancel</Button>
8	<Button href="/docs" variant="ghost">Docs</Button>
9</div>