text-animations
Expert knowledge for creative text animations - typewriter effects, character-by-character reveals, kinetic typography, split text animations, and expressive text motion.
What this skill does
# Text Animations Skill
Expert knowledge for creative text animations - typewriter effects, character-by-character reveals, kinetic typography, split text animations, and expressive text motion.
## When to Use
Activate this skill when:
- User wants typewriter/typing animations
- Creating character-by-character text reveals
- Building kinetic typography effects
- Need animated headings or titles
- Creating text scramble effects
- Building split-text animations
## File Patterns
- `**/*.tsx` with text animation components
- `**/components/Text*.tsx`
- `**/components/Heading*.tsx`
- `**/components/Title*.tsx`
## Text Animation Types
### 1. Typewriter Effects
#### Basic Typewriter
```tsx
import { motion, useAnimation } from 'framer-motion';
import { useEffect, useState } from 'react';
export function Typewriter({
text,
speed = 50,
delay = 0,
}: {
text: string;
speed?: number;
delay?: number;
}) {
const [displayText, setDisplayText] = useState('');
const [isComplete, setIsComplete] = useState(false);
useEffect(() => {
const timeout = setTimeout(() => {
let i = 0;
const interval = setInterval(() => {
if (i < text.length) {
setDisplayText(text.slice(0, i + 1));
i++;
} else {
setIsComplete(true);
clearInterval(interval);
}
}, speed);
return () => clearInterval(interval);
}, delay);
return () => clearTimeout(timeout);
}, [text, speed, delay]);
return (
<span>
{displayText}
{!isComplete && (
<motion.span
animate={{ opacity: [1, 0] }}
transition={{ duration: 0.5, repeat: Infinity }}
>
|
</motion.span>
)}
</span>
);
}
```
#### Typewriter with Delete
```tsx
export function TypewriterLoop({
texts,
typingSpeed = 50,
deletingSpeed = 30,
pauseDuration = 2000,
}: {
texts: string[];
typingSpeed?: number;
deletingSpeed?: number;
pauseDuration?: number;
}) {
const [currentTextIndex, setCurrentTextIndex] = useState(0);
const [displayText, setDisplayText] = useState('');
const [isDeleting, setIsDeleting] = useState(false);
useEffect(() => {
const currentFullText = texts[currentTextIndex];
const timeout = setTimeout(() => {
if (!isDeleting) {
if (displayText.length < currentFullText.length) {
setDisplayText(currentFullText.slice(0, displayText.length + 1));
} else {
setTimeout(() => setIsDeleting(true), pauseDuration);
}
} else {
if (displayText.length > 0) {
setDisplayText(displayText.slice(0, -1));
} else {
setIsDeleting(false);
setCurrentTextIndex((prev) => (prev + 1) % texts.length);
}
}
}, isDeleting ? deletingSpeed : typingSpeed);
return () => clearTimeout(timeout);
}, [displayText, isDeleting, currentTextIndex, texts, typingSpeed, deletingSpeed, pauseDuration]);
return (
<span>
{displayText}
<motion.span
className="inline-block w-0.5 h-[1em] bg-current ml-1"
animate={{ opacity: [1, 0] }}
transition={{ duration: 0.5, repeat: Infinity }}
/>
</span>
);
}
```
### 2. Character-by-Character Animations
#### Staggered Characters
```tsx
export function StaggeredText({
text,
staggerDelay = 0.03,
}: {
text: string;
staggerDelay?: number;
}) {
const characters = text.split('');
const containerVariants = {
hidden: {},
visible: {
transition: { staggerChildren: staggerDelay },
},
};
const charVariants = {
hidden: { opacity: 0, y: 20 },
visible: {
opacity: 1,
y: 0,
transition: { type: 'spring', stiffness: 300, damping: 20 },
},
};
return (
<motion.span
variants={containerVariants}
initial="hidden"
animate="visible"
className="inline-block"
>
{characters.map((char, i) => (
<motion.span
key={i}
variants={charVariants}
className="inline-block"
style={{ whiteSpace: char === ' ' ? 'pre' : 'normal' }}
>
{char}
</motion.span>
))}
</motion.span>
);
}
```
#### Wave Text
```tsx
export function WaveText({ text }: { text: string }) {
const characters = text.split('');
return (
<span className="inline-block">
{characters.map((char, i) => (
<motion.span
key={i}
className="inline-block"
animate={{
y: [0, -10, 0],
}}
transition={{
duration: 0.6,
delay: i * 0.05,
repeat: Infinity,
repeatDelay: 1,
}}
style={{ whiteSpace: char === ' ' ? 'pre' : 'normal' }}
>
{char}
</motion.span>
))}
</span>
);
}
```
#### Bouncy Text
```tsx
export function BouncyText({ text }: { text: string }) {
const characters = text.split('');
return (
<span className="inline-block">
{characters.map((char, i) => (
<motion.span
key={i}
className="inline-block"
whileHover={{
y: -10,
color: '#667eea',
transition: {
type: 'spring',
stiffness: 500,
damping: 10,
},
}}
style={{ whiteSpace: char === ' ' ? 'pre' : 'normal' }}
>
{char}
</motion.span>
))}
</span>
);
}
```
### 3. Word-by-Word Animations
#### Staggered Words
```tsx
export function StaggeredWords({
text,
staggerDelay = 0.1,
}: {
text: string;
staggerDelay?: number;
}) {
const words = text.split(' ');
const containerVariants = {
hidden: {},
visible: {
transition: { staggerChildren: staggerDelay },
},
};
const wordVariants = {
hidden: { opacity: 0, y: 20, filter: 'blur(10px)' },
visible: {
opacity: 1,
y: 0,
filter: 'blur(0px)',
transition: { duration: 0.4, ease: 'easeOut' },
},
};
return (
<motion.span
variants={containerVariants}
initial="hidden"
animate="visible"
className="inline"
>
{words.map((word, i) => (
<motion.span
key={i}
variants={wordVariants}
className="inline-block mr-2"
>
{word}
</motion.span>
))}
</motion.span>
);
}
```
#### Highlighted Words
```tsx
export function HighlightedText({
text,
highlightWords,
highlightColor = '#667eea',
}: {
text: string;
highlightWords: string[];
highlightColor?: string;
}) {
const words = text.split(' ');
return (
<span>
{words.map((word, i) => {
const isHighlighted = highlightWords.some(
(hw) => word.toLowerCase().includes(hw.toLowerCase())
);
return (
<motion.span
key={i}
className="inline-block mr-2"
initial={{ opacity: 0, y: 10 }}
animate={{ opacity: 1, y: 0 }}
transition={{ delay: i * 0.05 }}
>
{isHighlighted ? (
<motion.span
className="relative inline-block"
whileHover={{ scale: 1.05 }}
>
<motion.span
className="absolute inset-0 -z-10 rounded"
style={{ backgroundColor: highlightColor }}
initial={{ scaleX: 0 }}
animate={{ scaleX: 1 }}
transition={{ delay: i * 0.05 + 0.2, duration: 0.3 }}
/>
<span className="relative text-white px-1">{word}</span>
</motion.span>
) : (
word
)}
</motion.span>
);
})}
</span>
);
}
```
### 4. Text Scramble Effects
#### Scramble Text
```tsx
export function ScrambleText({
text,
duration = 1000,
}: {
text: string;
duration?: number;
}) {
const [displayText, setDisplayTeRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.