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

StickerPeel

sticker-peel

Lets users drag or hover a sticker corner to reveal a peel, shadow, and pointer-following highlight.

Usage

Basic usage

Place it in the relative container, hover/press and curl the edge to turn it up; imageSrc is required, rotate creates a skewed feeling.

hover Lift · Press and hold for larger · Drag to try

tsx
<div className="relative grid h-64 place-items-center overflow-hidden rounded-xl">
  <StickerPeel imageSrc="/sticker.png" width={150} rotate={14} />
</div>

Hemming direction

peelDirection Let the entire sticker rotate together with the curled edge to change the direction of lifting.

hover Lift · Press and hold for larger · Drag to try

tsx
<StickerPeel
  imageSrc="/bolt.png"
  width={150}
  rotate={-10}
  peelDirection={20}
/>

Large curling + strong highlights

Increase the reveal ratio of hover/active, and enhance the mouse following highlight of lightingIntensity.

hover Lift · Press and hold for larger · Drag to try

tsx
<StickerPeel
  imageSrc="/sticker.png"
  width={170}
  rotate={8}
  peelBackHoverPct={42}
  peelBackActivePct={55}
  lightingIntensity={0.7}
/>

Locked and cannot be dragged

draggable={false} Only retains the curling interaction and prohibits dragging.

hover Lift · Press and hold for larger · Drag to try

tsx
<StickerPeel imageSrc="/bolt.png" width={150} rotate={20} draggable={false} />

When to Use

Use StickerPeel for logos, badges, or campaign artwork that should feel like a physical sticker users can lift and reposition. It is image-specific and intentionally playful. Choose GlareHover or ShineBorder to animate an arbitrary container, or Lens to magnify part of an image.

Import

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

Props

NameTypeDefaultDescription
imageSrc *string-Image URL used for both the sticker face and its vertically flipped peel-back layer
altstring""Native image alternative text; leave empty only when the sticker is decorative
widthnumber200Sticker width in pixels; the image preserves its intrinsic aspect ratio
rotatenumber30Rotation applied to the printed image, in degrees
peelBackHoverPctnumber30Percentage of the sticker height revealed from the top while hovered
peelBackActivePctnumber40Percentage revealed while pressed; normally larger than the hover value
peelDirectionnumber0Rotation of the complete sticker and peel direction, in degrees
shadowIntensitynumber0.6Drop-shadow opacity from 0 to 1
lightingIntensitynumber0.4Pointer-following highlight opacity from 0 to 1; 0 removes the highlight layer
initialPosition"center" | { x: number; y: number }"center"Initial position preset or pixel translation from the parent's top-left origin
draggablebooleantrueEnable Pointer Events dragging; coordinates are clamped to the parent's measured bounds during drag and after resize or orientation changes
Also inherits HTMLAttributes<HTMLDivElement> except children, forwarding className, style, and native event handlers to the draggable root.

Usage Guidelines

  • The root is absolutely positioned. Give its parent position: relative, explicit dimensions, and overflow: hidden; drag coordinates are clamped against that parent's current content box.
  • With draggable=true, the root captures pointer input and uses touch-none. Disable dragging when the sticker overlaps scrolling or clickable controls that must receive those gestures.
  • Reduced motion removes peel transitions and drag-induced tilt. Hover/press peel states and the pointer highlight still render, but update without motion; the sticker image always remains visible.

Related

BorderBeam · ShineBorder · GlareHover · Lens · AnimatedBeam · OrbitingCircles

Playground

hover Lift · Press and hold for larger · Drag to try

<div className="relative grid h-64 place-items-center overflow-hidden rounded-xl"
     style={{ background: "oklch(0.16 0.02 255)" }}>
  <StickerPeel
    imageSrc="/sticker.png"
    width={160}
    rotate={16}
    peelBackHoverPct={30}
    peelBackActivePct={42}
    lightingIntensity={0.4}
    draggable={true}
  />
</div>
PreviousStarBorderDecorationNextTargetCursor

On this page

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