uiniverse

animations

FadeIn

Animates children with a simple opacity fade on mount or viewport entry.

v1.0.0react >=18next >=14tailwind >=4motion >=12
entrancescrollfadeopacityrevealsimple

Preview

Loading preview...

Props

PropTypeDefaultDescription
children*ReactNodeContent to animate
presetMotionPresetNamefadeInMotion preset from the token system
delaynumberCustom delay in milliseconds
triggerOnViewbooleantrueAnimate when element enters viewport
viewThresholdnumber0.2Fraction of element visible before triggering
oncebooleantrueOnly animate once (don't re-trigger on scroll back)
classNamestringAdditional Tailwind classes

Slots

SlotTypeRequiredDescription
childrenReactNodeYesContent to fade in

Layout

Display: block
Responsive: No

Wraps children in an animated div with opacity transition.

Examples

Basic usage

<FadeIn>
  <img src="/hero.png" alt="Hero" className="w-full" />
</FadeIn>

Delayed reveal

<FadeIn delay={300}>
  <p className="text-neutral-400">Appears after 300ms</p>
</FadeIn>

AI Usage Hint

Use FadeIn for simple opacity reveals without any directional movement. Ideal for overlays, modal content, image reveals, or any element that should appear without sliding. For directional entrance, use FadeUp or SlideIn instead. Wrap in StaggerGroup for cascading effects.

Works Well With

StaggerGroup