Text & Typography Fancy Stable

SparklesText

Text overlaid with small SVG star sparkles that scale, rotate, and fade in a continuous loop, each one regenerating at a random position once its lifespan expires, cycling between two configurable colors

Preview

Installation

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

Usage

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

<SparklesText />

Examples

Basic Usage

Custom Colors

Change sparkle colors.

Lots of Sparkles

Increase sparkle count.

Props

PropTypeDefaultDescription
text *string-Text to display
sparklesCount number10Number of sparkle stars
colors { first: string; second: string }{ first: "#9E7AFF", second: "#FE8BBB" }Two colors for sparkle stars