Skip to content
Buttons Fancy Stable

RainbowButton

.md

Animated button with a rainbow gradient border; on hover or focus a rainbow beam rides around the border with a soft halo. Other native attributes are forwarded to the rendered element

Available for Svelte 5, React, and Vue 3.

Preview

Installation

pnpm add fancy-ui-svelte
import { RainbowButton } from "fancy-ui-svelte";

Usage

svelte
<script lang="ts">
  import { RainbowButton } from 'fancy-ui-svelte';
</script>

<RainbowButton />

Examples

Basic Usage

Animation Speed

Control the animation speed.

With Icons

Add icons inside the button.

Disabled State

Render as an anchor element.

Custom Styling

Override styles with the class prop.

Props

PropTypeDefaultDescription
speed number2Animation speed in seconds
href string-Render as anchor element when provided
sound booleanfalsePlays the press cue on activation, once the user has enabled sound
type "button" | "submit" | "reset""button"Native button type, ignored when rendered as an anchor
disabled boolean-Disables the button and suppresses the press cue
onclick (event: MouseEvent) => void-Called once per activation, after the optional sound cue; never while disabled.

Slots

SlotDescription
children Button label content