Stroke Fill

SVG text animates from stroke to fill with smooth transition.

Main Features of Stroke Fill

How to Use Stroke Fill in Next.js

Installation Guide for Stroke Fill

Props

Customize the component with these props

PropertyTypeDefaultDescription
text
stringEleganceText to display
backgroundColor
stringbg-zinc-950Background color of the component
strokeWidth
number1.5Width of the stroke
strokeColor
stringstroke-zinc-100Color of the stroke
fillColor
string#ffffffColor of the fill
fontFamily
stringfont-[900]Font family class
fontSize
stringtext-8xlFont size of the text
fontWeight
stringuppercaseFont weight of the text
tracking
stringtracking-widestLetter spacing
animationDuration
number3Animation duration in seconds
fillDelay
number2Delay before fill animation
fillDuration
number1Duration of fill animation
className
stringAdditional CSS classes

When to Use

Excellent for luxury brand logos, cinematic intros, and Next.js Landing Pages. Use this React component for a high-impact reveal where text starts as a delicate outline and fills into a solid, bold shape.

Best Practices

Follow React best practices by setting the `fillDelay` to match your viewport entry. Maintain consistent spacing within your design system by using high-contrast colors for the `strokeColor`. Optimize for performance by keeping the SVG path complexity manageable.

Why This Component Matters in Modern UI Development

SVG stroke animations are a classic mark of quality in modern frontend development. This customizable UI component provides a robust framework for timed reveals, adding visual polish and semantic authority to your real-world application architecture.

Frequently Asked Questions

QDoes it work with any font?

Yes, it works with any web font or local font. The component automatically generates the SVG paths based on the rendered text.

QIs the stroke thickness adjustable?

The `strokeWidth` prop allows you to make the initial outline as delicate or as heavy as your design requires.

QCan I trigger the fill on hover?

The current implementation is time-based for cinematic effect, but a hover-triggered fill can be easily implemented with a state change.

Stroke Fill - React Text Animation & Reveal | Uilora