
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
react-beautiful-text
Advanced tools
A collection of beautiful, animated text components for React applications. Create stunning text effects with minimal effort!
Perfect for events, celebrations, lucky draws, and special occasions.
Try different effects, customize text, font size, and font family. View and copy the code for any configuration!
npm install react-beautiful-text
or
yarn add react-beautiful-text
Use the BeautifulText component with effect names. Perfect for dynamic effect selection with dropdowns.
import { BeautifulText, getAllEffects } from 'react-beautiful-text';
function App() {
const [effect, setEffect] = useState('neon');
const effects = getAllEffects();
return (
<div>
{/* Select dropdown for effect switching */}
<select value={effect} onChange={(e) => setEffect(e.target.value)}>
{effects.map((effectName) => (
<option key={effectName} value={effectName}>
{effectName}
</option>
))}
</select>
{/* Single component with dynamic effect */}
<BeautifulText
text="LUCK4YOU"
effect={effect}
style={{ fontSize: '80px' }}
/>
</div>
);
}
Import and use specific components directly.
import { NeonText, FireText, GoldText } from 'react-beautiful-text';
function App() {
return (
<div>
<NeonText text="LUCK4YOU" style={{ fontSize: '80px' }} />
<FireText text="LUCK4YOU" style={{ fontSize: '80px' }} />
<GoldText text="LUCK4YOU" style={{ fontSize: '80px' }} />
</div>
);
}
Get all available effect names as an array.
import { getAllEffects } from 'react-beautiful-text';
const effects = getAllEffects();
// Returns: ['neon', 'gradient', 'showgirl', 'glowing', ...]
Get detailed information about all effects.
import { getAllEffectsInfo } from 'react-beautiful-text';
const effectsInfo = getAllEffectsInfo();
// Returns array of: { name, label, description, category }
Get effects filtered by category.
import { getEffectsByCategory } from 'react-beautiful-text';
const basicEffects = getEffectsByCategory('basic');
const specialEffects = getEffectsByCategory('special');
const eventEffects = getEffectsByCategory('event');
Get information about a specific effect.
import { getEffectInfo } from 'react-beautiful-text';
const info = getEffectInfo('neon');
// Returns: { name: 'neon', label: 'Neon', description: '...', category: 'basic' }
import React, { useState } from 'react';
import { BeautifulText, getAllEffectsInfo } from 'react-beautiful-text';
function EffectSelector() {
const [selectedEffect, setSelectedEffect] = useState('gold');
const [text, setText] = useState('LUCK4YOU');
const [fontSize, setFontSize] = useState(80);
const effects = getAllEffectsInfo();
return (
<div>
<div>
<input
type="text"
value={text}
onChange={(e) => setText(e.target.value)}
placeholder="Enter text"
/>
<input
type="number"
value={fontSize}
onChange={(e) => setFontSize(Number(e.target.value))}
min={20}
max={200}
/>
<select
value={selectedEffect}
onChange={(e) => setSelectedEffect(e.target.value)}
>
{effects.map((effect) => (
<option key={effect.name} value={effect.name}>
{effect.label} - {effect.description}
</option>
))}
</select>
</div>
<BeautifulText
text={text}
effect={selectedEffect}
style={{ fontSize: `${fontSize}px` }}
/>
</div>
);
}
import { BeautifulText, getEffectsByCategory } from 'react-beautiful-text';
function CategorySelector() {
const [effect, setEffect] = useState('party');
const eventEffects = getEffectsByCategory('event');
return (
<div>
<h2>Event Effects</h2>
{eventEffects.map((effectInfo) => (
<button
key={effectInfo.name}
onClick={() => setEffect(effectInfo.name)}
>
{effectInfo.label}
</button>
))}
<BeautifulText
text="LUCK4YOU"
effect={effect}
style={{ fontSize: '100px' }}
/>
</div>
);
}
import { BeautifulText } from 'react-beautiful-text';
function LuckyDraw() {
const [winner, setWinner] = useState('');
const [isDrawing, setIsDrawing] = useState(false);
const drawWinner = () => {
setIsDrawing(true);
// Simulate drawing
setTimeout(() => {
setWinner('WINNER #123');
setIsDrawing(false);
}, 3000);
};
return (
<div>
<button onClick={drawWinner}>Draw Winner</button>
{isDrawing ? (
<BeautifulText
text="DRAWING..."
effect="fire"
style={{ fontSize: '120px' }}
/>
) : winner ? (
<BeautifulText
text={winner}
effect="gold"
style={{ fontSize: '120px' }}
/>
) : (
<BeautifulText
text="LUCK4YOU"
effect="party"
style={{ fontSize: '100px' }}
/>
)}
</div>
);
}
import { NeonText } from 'react-beautiful-text';
<NeonText text="LUCK4YOU" style={{ fontSize: '80px' }} />
import { GradientText } from 'react-beautiful-text';
<GradientText
text="LUCK4YOU"
colors={["#40FFAA", "#4079FF", "#FFE740", "#FF40C0"]}
animationSpeed={2}
style={{ fontSize: '80px' }}
/>
Props:
text: string (required, default: "LUCK4YOU")colors: string[] (optional)animationSpeed: number (optional)showBorder: boolean (optional)style: React.CSSProperties (optional)className: string (optional)import { FireText } from 'react-beautiful-text';
<FireText text="LUCK4YOU" style={{ fontSize: '80px' }} />
import { GoldText } from 'react-beautiful-text';
<GoldText text="LUCK4YOU" style={{ fontSize: '80px' }} />
import { PartyText } from 'react-beautiful-text';
<PartyText text="LUCK4YOU" style={{ fontSize: '80px' }} />
import { CurvedLoopText } from 'react-beautiful-text';
<CurvedLoopText
text="LUCK4YOU"
speed={2}
curveAmount={400}
direction="left"
interactive={true}
style={{ fontSize: '80px' }}
/>
Props:
text: string (required, default: "LUCK4YOU")marqueeText: string (optional)speed: number (optional, default: 2)curveAmount: number (optional, default: 400)direction: 'left' | 'right' (optional, default: 'left')interactive: boolean (optional, default: true)style: React.CSSProperties (optional)className: string (optional)All components support these common props:
text: string (required, default: "LUCK4YOU")style: React.CSSProperties (optional)className: string (optional)Full TypeScript support with exported types:
import type {
BeautifulTextProps,
EffectName,
EffectInfo,
// Individual component props
NeonTextProps,
GradientTextProps,
FireTextProps,
GoldTextProps,
PartyTextProps,
// ... and more
} from 'react-beautiful-text';
Works in all modern browsers that support:
Created with ❤️ by the React Beautiful Text team.
Special thanks to Lucky4you - quaysotrungthuong.vn - Professional lucky draw software for events.
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
https://github.com/t-code4change/react-beautiful-text
If you like this project, please give it a ⭐ on GitHub!
FAQs
A collection of beautiful, animated text components for React
We found that react-beautiful-text demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.