Installation
Install the component
Run the following command to install the component and its dependencies:
npx @motion-core/cli add text-scrambleImport the component
Import the component into your Svelte file:
import { TextScramble } from "$lib/motion-core";import { TextScramble } from "$lib/motion-core";Usage
Props
TextScramble
| Prop | Type | Default |
|---|---|---|
children | Snippet | — |
hoverTarget | HTMLElementnull | null |
scrambleDuration | number | 0.6 |
stagger | number | 0.03 |
cycles | number | 12 |
characters | string | "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*" |
class | string | "" |