Buttons Fancy Stable

GradientButton

Button with a rotating conic-gradient rainbow border effect

Preview

Installation

pnpm add fancy-ui-svelte
import { GradientButton } from 'fancy-ui-svelte'

Usage

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

<GradientButton />

Examples

Basic Usage

Custom Colors

Change the gradient colors.

Border Width & Blur

Adjust thickness and softness.

Animation Speed

Control the rotation speed.

Border Radius

Change the button shape.

Background Color

Set the content area background.

Interactive Playground

Props

PropTypeDefaultDescription
colors string[]["#FF0000","#FFA500","#FFFF00","#008000","#0000FF","#4B0082","#EE82EE","#FF0000"]Gradient colors for the conic-gradient border
duration number2500Animation duration in milliseconds
borderWidth number2Border width in pixels
borderRadius number8Border radius in pixels
blur number4Blur amount for the gradient in pixels
bgColor string"#000"Background color of the button content area

Slots

SlotDescription
childrenButton content