Text Widget
The Text Widget displays static or animated text content with fade animations. It's perfect for headlines, titles, labels, and any text that needs to appear with a smooth fade-in effect.
Basic Usage
<div data-type="text"
data-animate="fade"
data-ease="easeIn"
data-duration-animation="2"
data-start="0"
class="text-4xl font-bold text-blue-600">
Your text content here
</div>Attributes
data-type
string
-
Must be "text"
data-animate
string
-
Animation type: "fade"
data-ease
string
-
Easing function: "easeIn", "easeOut"
data-duration-animation
number
2
Animation duration in seconds
data-start
number
0
When animation starts in seconds
Animation Behavior
Fade Animation
The text widget supports fade animations that smoothly transition the element's opacity:
Before start: Element is invisible (opacity: 0)
During animation: Fades in from 0 to 1 opacity
After animation: Remains fully visible (opacity: 1)
Easing Functions
easeIn
Slow start, fast end
Text appearing
easeOut
Fast start, slow end
Text disappearing
Default
Cubic ease-out
General use
Examples
Simple Fade-In Text
Multiple Text Elements
Styled Text with Gradient
Styling Options
Typography Classes
Color Classes
Positioning Classes
Animation Timing
Quick Fade (1 second)
Slow Fade (4 seconds)
Delayed Start
Common Use Cases
Headlines and Titles
Labels and Captions
Call-to-Action Text
Best Practices
Timing
Quick text: Use 1-2 second durations for labels and captions
Main content: Use 2-3 second durations for headlines and titles
Emphasis: Use longer durations (3-4 seconds) for important messages
Styling
Contrast: Ensure good contrast between text and background
Readability: Use appropriate font sizes for your content
Hierarchy: Use different sizes and weights to create visual hierarchy
Positioning
Center important text: Use centering classes for main content
Corner positioning: Use corners for labels, timestamps, and secondary info
Consistent spacing: Use margin and padding classes for consistent spacing
Troubleshooting
Text Not Appearing
Problem: Text doesn't show up in the video
Solutions:
Check that
data-type="text"is set correctlyVerify the element has content inside the tags
Make sure
data-starttime is reasonable (not too high)Ensure the text color contrasts with the background
Animation Too Fast/Slow
Problem: Animation timing doesn't feel right
Solutions:
Adjust
data-duration-animationvalueLonger duration = slower animation
Shorter duration = faster animation
Test different values to find the right timing
Text Overlapping
Problem: Multiple text elements overlap
Solutions:
Use different positioning classes
Add margins or padding between elements
Space out the
data-starttimesUse different vertical positions (top, middle, bottom)
Poor Readability
Problem: Text is hard to read
Solutions:
Increase font size with larger text classes
Improve contrast with different color classes
Add background colors or shadows
Use bold or semibold font weights
Related Widgets
Typewriter Widget - For typing effects
Container Widget - For grouping text elements
Image Widget - For combining text with images
Last updated