121
GitHub
Layout

ScrollReveal

Animates wrapped content as it first enters the viewport.

FrameworksAstro · React · Elements

Registry commandlumen add ScrollReveal

InteractionEnhanced runtime

01

See it in context

Preview

Progressive by default

Content remains readable when motion is reduced or JavaScript is unavailable.

02

Copy a working example

Usage

Astro examples assume UIPrimitives is mounted once in your root layout. Do not add the runtime next to each component instance.

astro
---
import { ScrollReveal } from '@santi020k/lumen-astro'
---

<ScrollReveal animation="fade">
  <article style="max-width: 28rem;">
    <strong>Progressive by default</strong>
    <p style="margin-top: 0.35rem; color: hsl(var(--ink-soft));">
      Content remains readable when motion is reduced or JavaScript is unavailable.
    </p>
  </article>
</ScrollReveal>
---
import { ScrollReveal } from '@santi020k/lumen-astro'
---

<ScrollReveal animation="fade">
  <article style="max-width: 28rem;">
    <strong>Progressive by default</strong>
    <p style="margin-top: 0.35rem; color: hsl(var(--ink-soft));">
      Content remains readable when motion is reduced or JavaScript is unavailable.
    </p>
  </article>
</ScrollReveal>
03

Choose your target

Add this component

Choose the package for your runtime. All adapters share the Lumen stylesheet. Use the matching registry command when you want a local wrapper for that framework.

bash@santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
pnpm add @santi020k/lumen-astro
bashAstro wrapper
lumen add ScrollReveal
lumen add ScrollReveal

API reference

Lumen-specific props and runtime attributes for the Astro primitive. React props follow the same names; Elements use equivalent kebab-case attributes where custom elements expose them.

AttributeValuesDefaultDescription
animation"fade" | "slide-up" | "scale""fade"Sets the reveal transition. UIPrimitives observes the element and reveals it as it enters the viewport.
class, classNamestring""Merges custom classes with the generated ui-* root classes.
...native attributesHTML attributes-Forwards standard attributes to the root element unless the component consumes them.