Getting Started
Components
Special Effects
Animations
Text Animations
Backgrounds
Install Svelte Magic UI components with the Shadcn Svelte CLI and configure Svelte 5, Tailwind CSS, and Motion SV dependencies.
Getting Started
Create Project
Create a new Svelte project using the official SvelteKit CLI:
pnpm dlx sv create my-app
Make sure to select Tailwind CSS when prompted.
Configure Shadcn Svelte
Initialize Shadcn Svelte in your project:
pnpm dlx shadcn-svelte@latest init
Use the default configuration or customize to fit your needs.
Install Motion
Install the motion-sv animation library:
pnpm add motion-sv
Add Components
Install any component using the CLI. Example with Morphing Text:
pnpm dlx shadcn-svelte@latest add https://sv-animations.vercel.app/r/morphing-text.json
Usage Example
Here's how to use the Morphing Text component:
<script lang="ts"> import { MorphingText } from "#lib/components/magic/morphing-text/index.js"; const texts = [ "Hello", "Morphing", "Text", "Animation", "Svelte", "Component", "Smooth", "Transition", "Engaging", ];</script>
<MorphingText {texts} />example.svelte
<script lang="ts"> import { MorphingText } from "$lib/components/magic/morphing-text/index.js"; const texts = [ "Hello", "Morphing", "Text", "Animation", "Svelte", "Component", "Smooth", "Transition", "Engaging", ];</script>
<MorphingText {texts} />