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

GradualBlur

gradual-blur

Builds a layered directional blur that increases gradually across content.

Usage

Basic usage

Put it into the container of relative + overflow-hidden, and apply a layer of progressive softening from clear to blur along the edge specified by position.

Hulian component library

Enterprise level · High quality · Progressive blur welt

tsx
<div className="relative h-64 overflow-hidden rounded-xl">
  {/* ...lower content... */}
  <GradualBlur position="bottom" height="7rem" />
</div>

Strong blur · Exponentially increasing

strength improves the overall viscosity, divCount adds more layers to make the transition more delicate, and exponential makes the near edges sharply opaque.

Hulian component library

Enterprise level · High quality · Progressive blur welt

tsx
<GradualBlur
  position="top"
  height="8rem"
  strength={4}
  divCount={8}
  exponential
/>

Vertical welt · Curve

position Set left/right to run the vertical bar, width to control the thickness, and curve to switch the climbing curve.

Hulian component library

Enterprise level · High quality · Progressive blur welt

tsx
<GradualBlur
  position="right"
  width="9rem"
  strength={2.5}
  divCount={6}
  curve="bezier"
/>

Hover enhancement

After hoverIntensity is passed, the container takes over the pointer event, and the blur amount is enlarged by multiples when the mouse is moved up.

Hulian component library

Enterprise level · High quality · Progressive blur welt

tsx
<GradualBlur
  position="bottom"
  height="7rem"
  strength={1.5}
  hoverIntensity={2}
/>

When to Use

Attach it to an edge of a scroller or image wall to soften content as it approaches the boundary, often at the top or bottom of a long list. It uses backdrop-filter to blur underlying content instead of drawing an opaque mask. Use BorderBeam for a decorative border highlight. The parent must be positioned with relative.

Import

ts
import { GradualBlur } from "@hulianui/ui"

Props

NameTypeDefaultDescription
position"top"|"bottom"|"left"|"right""bottom"The side where the fuzzy bar abuts; top/bottom are horizontal bars, left/right are vertical bars
strengthnumber2Blur strength base, each layer increases according to the curve, recommended 1-6
heightstring"6rem"Horizontal bar thickness; if width is not passed in vertical bar mode, this value will be reused as vertical bar width
widthstring-Vertical bar (left/right) width, the default falls back to height
divCountnumber5The more blur layers you add, the more delicate the transition will be and the more performance you will need. It is recommended 3-10
exponentialbooleanfalseExponentially increasing blur amount (near edges become blurry sharply), false=linear
curve"linear"|"bezier"|"ease-in"|"ease-out"|"ease-in-out""linear"The climbing curve of the blur amount of each layer along the progress
opacitynumber1Overall opacity
hoverIntensitynumber-Blur multiplier on hover. Providing it enables pointer events; when omitted, the overlay does not block interaction
revealOnScrollbooleanfalseFade in when entering the viewport (IntersectionObserver driver), invisible by default when turned on
durationstring"0.3s"Fade-in transition duration, only valid for revealOnScroll
zIndexnumber10Overlaid z-index
classNamestring-Root container additional className
styleCSSProperties-Forward the root container inline style (merged with the internal calculation style, the same name shall prevail)

Slots

SlotTypeDescription
childrenReactNodeContent covered on the blur layer (such as edge title/operation bar)

Usage Guidelines

  • Working with backdrop-filter: If the ancestor element itself carries filter / backdrop-filter / transform, a new containing block will be created, and the fixed/absolute positioning of the blur layer may be misaligned and invalid, see [[backdrop-filter-ancestor-breaks-fixed-overlay-centering]].
  • When hoverIntensity is omitted, the container uses pointer-events: none, allowing interaction with content underneath. Providing it enables pointer handling, so avoid covering clickable content.
  • When width is not passed, the vertical bar width reuses the height value. This is an intentional design. Do not mistake it for a bug.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

Hulian component library

Enterprise level · High quality · Progressive blur welt

<div className="relative h-64 overflow-hidden rounded-xl bg-surface">
  {/* ...lower content... */}
  <GradualBlur
    position="bottom"
    strength={2}
    divCount={5}
    exponential={false}
  />
</div>
PreviousGhostCursorDecorationNextImageTrail

On this page

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