Spelte

Open Github

Randomized Text

Text component with randomized character reveal animation.

Introducing Spelte Loremipsumdolorsitametconsectetur,adipisicingelit.Animiarchitectosolutamodifacilisfugitpossimuscommodi!Ipsamdelectusunderepellendus.

Installation

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

Examples

Split By

Split by characters

Usage

<script>
	import RandomizedText from '$registry/spelte/randomized-text.svelte';
</script>
 
<RandomizedText text="Generate momentum" />

Props

PropTypeDefaultDescription
textstringText to display with randomized animation
split"words" | "chars""words"Split by words or characters
delaynumber0.2Base delay before animation starts
inViewPropbooleanfalseTrigger only when in viewport
oncebooleantrueOnly animate once
classstringAdditional CSS classes