Sparkles Text
Sparkles Text places animated decorative marks around child text.
Practical React example
Decorate a short celebratory heading without making the sparkle field meaningful.
Before you copy and paste
Match the imported component’s client or server rendering boundary before using the example. Copy components/magicui/sparkles-text.tsx and its returned support files from the Code tab; preserve the project-relative paths.
Listed package dependencies: motion.
Use the Code tab for the component files and installation instructions, then adapt the imports in this example to your project.
Decorate a short celebratory heading without making the sparkle field meaningful
// Usage adapted from Magic UI's pinned MIT source.
// Copyright (c) Magic UI. See ./LICENSES.md.
'use client';
import { SparklesText } from "@/components/magicui/sparkles-text"
export function ComponentExample() {
return (
<SparklesText>Sparkles Text</SparklesText>
);
}
Usage example adapted from Magic UI's pinned MIT source. Retain the source licence notices when copying.
Keep the heading itself semantic and readable, and use sparklesCount and colors conservatively for the available region.
Customization
- SparklesTextProps.as
- Optional; ReactElement.
- SparklesTextProps.className
- Optional; string.
- SparklesTextProps.children
- Required; React.ReactNode.
- SparklesTextProps.sparklesCount
- Optional; number.
- SparklesTextProps.colors
- Optional; { first: string second: string }.
Integration notes
- Do not use continuous sparkles as a success signal before an operation is confirmed.
- Test reduced motion, text zoom and whether decorations overlap nearby controls.
Component source: Magic UI documentation . These examples describe the version imported into Rendyn. Upstream APIs may have changed; retain the source licence notices when adapting the code.
Give your agent taste.
The best way to use Rendyn is through MCP. Let your agent find the right component, compare previews and bring the source into your project.
All components are free. Sign up only to connect MCP.