Spelte

Command Palette
Search for a command to run...

Rich Button

A button component with rich styling and color variants.

Installation

pnpm dlx shadcn-svelte@latest add https://spelte.dev/r/rich-button.json

Usage

<script>
  import RichButton from '$registry/spelte/rich-button.svelte';
</script>
 
<RichButton>Default</RichButton>
<RichButton color="blue">Blue</RichButton>
<RichButton size="lg">Large</RichButton>

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | color | "default" | "blue" | "purple" | "pink" | "red" | "orange" | "green" | ... | "default" | Color variant (supports all Tailwind colors) | | size | "sm" | "default" | "lg" | "default" | Size variant | | href | string | — | Renders as <a> link when set | | class | string | — | Additional CSS classes |