Hulian UIv0.93.5413 components0 components
  • Start
  • Components
  • Blocks
  • Pages
  • Demos
  • Changelog
ChineseEnglish
  • ComponentsComponents
  • ThemeTheme

Backgrounds

  • DotPattern
  • GridPattern
  • StripedPattern
  • Spotlight
  • FadeMask
  • RetroGrid
  • Ripple
  • Meteors
  • Aurora
  • Particles
  • FlickeringGrid
  • WavyBackground
  • Silk
  • Iridescence
  • Threads
  • Orb
  • LiquidChrome
  • Balatro
  • Ballpit
  • Beams
  • ColorBends
  • DarkVeil
  • Dither
  • DotField
  • EvilEye
  • FaultyTerminal
  • Ferrofluid
  • FloatingLines
  • Galaxy
  • GradientBlinds
  • Grainient
  • GridDistortion
  • GridMotion
  • GridScan
  • Hyperspeed
  • LetterGlitch
  • Lightfall
  • Lightning
  • LightPillar
  • LightRays
  • LineWaves
  • LiquidEther
  • PixelBlast
  • PixelSnow
  • Plasma
  • PlasmaWave
  • Prism
  • PrismaticBurst
  • Radar
  • RippleGrid
  • ShapeGrid
  • SideRays
  • SoftAurora

Overlay Effects

  • BorderBeam
  • ShineBorder
  • GlareHover
  • Lens
  • AnimatedBeam
  • OrbitingCircles
  • ProgressiveBlur
  • CardSpotlight
  • Reveal
  • Antigravity
  • BlobCursor
  • ClickSpark
  • Crosshair
  • ElectricBorder
  • GhostCursor
  • GradualBlur
  • ImageTrail
  • LaserFlow
  • MagicRings
  • Magnet
  • MagnetLines
  • MetaBalls
  • MetallicPaint
  • OrbitImages
  • PixelTrail
  • PixelTransition
  • Ribbons
  • ShapeBlur
  • SplashCursor
  • StarBorder
  • StickerPeel
  • TargetCursor
  • Cubes
  • Tilt
  • BorderGlow
  • GlassIcons
  • GlassSurface
  • Lanyard
  • ModelViewer
  • FluidGlass

Reveal

reveal

Reveals arbitrary content with configurable direction, delay, and viewport trigger.

Usage

Basic usage

A single piece of content floats from the bottom, from blur to clear, and plays immediately after mounting. It is suitable for the first screen hero.

A piece of content floats from bottom to top, from blur to clear.
tsx
<Reveal trigger="mount">
  <div className="card">A piece of content floats from bottom to top, from blur to clear. </div>
</Reveal>

Level-by-level arrangement Stagger

The Stagger container presses gap to wake up the internal StaggerItem in sequence, and can overwrite y/scale/blur one by one.

First line
Second line
The finale: the heavier blur + scale
tsx
<Stagger trigger="mount" gap={0.1}>
  <div className="flex flex-col gap-3">
    <StaggerItem>
      <div className="card">First line</div>
    </StaggerItem>
    <StaggerItem>
      <div className="card">Second line</div>
    </StaggerItem>
    <StaggerItem y={22} scale={0.94} blur={12}>
      <div className="card">Final item: heavier blur + scale</div>
    </StaggerItem>
  </div>
</Stagger>

Triggered when scrolling into the viewport

Default trigger=in-view: The element appears when it is scrolled into the viewport (once only plays once by default).

Appears when scrolling here (one-time only).
tsx
<div className="max-h-72 overflow-auto">
  <div className="h-64" />
  <Reveal>
    <div className="card">Reappears when scrolling here (one-time). </div>
  </Reveal>
  <div className="h-40" />
</div>

When to Use

Use it when any block-level content (card/paragraph/list) wants to float and fade in when it enters the viewport or is mounted, or when multiple items are entered in staggered order. This is a general block-level animation primitive that works on any children; only use ScrollFloat for titles that scroll text character by character, and use BorderBeam / ShineBorder for decorative special effects such as border light strips/gloss.

Import

ts
import { Reveal, Stagger, StaggerItem } from "@hulianui/ui"

Props

Reveal is shared with Stagger (inherits div props, and eliminates motion conflicting onDrag*/onAnimationStart):

NameTypeDefaultDescription
trigger"in-view" | "mount""in-view"Play on viewport entry or immediately on mount
oncebooleantrueWhether to play only once when in-view

Reveal (extra):

NameTypeDefaultDescription
ynumber24Starting downward movement distance px (floating from bottom)
blurnumber8Starting blur px (focus pulled in, GPU compositing)
scalenumber1Start zoom (<1 position like "put on bookshelf")
delaynumber-Delay seconds (used for peak staggering of independent blocks; no delay is required for container orchestration in Stagger)

Stagger (extra):

NameTypeDefaultDescription
gapnumber0.08Peak offset seconds between sub-items
delaynumber0The entire group of starting delay seconds

StaggerItem (inherits div props, eliminates motion conflict items):

NameTypeDefaultDescription
ynumber18Starting downward movement distance px
blurnumber8Start blur px
scalenumber1Start zoom (<1 like "Put on bookshelf")

Usage Guidelines

  • Let Stagger coordinate timing for its StaggerItem children. Use Reveal.delay only when sequencing independent reveal blocks.
  • This is the client component of motion runtime (including "use client"): it is already the client boundary in Next.js App Router, and can be combined normally according to the server/client boundary. There is no need to upgrade the entire parent layout to client for it.
  • Directly render the final state (visible, not blurry) under reduced-motion. Do not use the entry animation as a switch for content visibility.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

A piece of content floats according to the selected parameters, from blur to clear.
<Reveal trigger="mount" y={24} blur={8} scale={1}>
  <div className="card">Floating content</div>
</Reveal>
PreviousCardSpotlightDecorationNextAntigravity

On this page

  • Usage
  • Documentation
    • When to Use
    • Import
    • Props
    • Usage Guidelines
    • Related
  • Playground