Sparkles Text
A dynamic text that generates continuous sparkles with smooth transitions, perfect for highlighting text with animated stars.
Magic UI
import { SparklesText } from '@/registry/magicui/sparkles-text'
export function SparklesTextDemo() { return <SparklesText>Magic UI</SparklesText>}Installation
Section titled “Installation”pnpm dlx shadcn@latest add @magicui-solid/sparkles-textbunx shadcn@latest add @magicui-solid/sparkles-textyarn dlx shadcn@latest add @magicui-solid/sparkles-textnpx shadcn@latest add @magicui-solid/sparkles-textImport
Section titled “Import”import { SparklesText } from '@/components/magicui/sparkles-text'<SparklesText>Sparkles Text</SparklesText>| Prop | Type | Default | Description |
|---|---|---|---|
children |
string |
- |
The content to display |
class |
string |
- |
The class name to be applied to the sparkles text. |
sparklesCount |
number |
10 |
sparkles count that appears on the text |
colors |
object |
{first: '#A07CFE', second: '#FE8FB5'} |
the sparkles colors |
Credits
Section titled “Credits”- Credit to @simonlejeune
Original:
magicui.design/docs/components/sparkles-text