tween
ComponentsTemplatesShowcaseContact

Command Palette

Search for a command to run...

Getting Started
  • Introduction
  • Installation
  • StoryNew
Guides
  • Motion Principles
  • Scroll and Smooth Scroll
  • Performance and Accessibility
Scroll Animations
  • Sticky Cards Scroll
  • Rise Fan Cards Scroll
  • Rotate Stack Scroll
  • Doodle Lens ScrollNew
  • Slit Open Hero ScrollNew
  • Logo Mask Zoom ScrollNew
  • ASCII Dissolve ScrollNew
  • Lottie Flight ScrollNew
  • Inline Icon Text ScrollNew
  • Starfield ScrollNew
  • Name Swap ScrollNew
  • Spotlight Gallery HeroNew
  • Slit Rotate Hero ScrollNew
  • Stroke Cover ScrollNew
  • Stroke Rows ScrollNew
Text Animations
  • Text Skew Reveal
  • Block Text Reveal
Hover & Cursor
  • Image Trail Cursor
  • Cursor Depth Logo
  • Physics Tag Drop
  • Elastic Card ListNew
  • Magnetic Cards SpringNew
Sliders & Carousels
  • Wheel Fullscreen Carousel
  • Ripple Displacement Slider
  • Three.js Blend Slider
  • Stacked Deck Slider
  • Orbit Cylinder SliderNew
  • Fan Stack SliderNew
  • Exponential Strip SliderNew
  • Dual Column SliderNew
Galleries & Grids
  • Scroll Wave Gallery
Menus & Navigation
  • Shrink Page MenuNew
Preloaders & Intros
  • Floating Items RevealNew
  • Word Cycle RevealNew
  • Tile Grid LoaderNew
Page Transitions
  • Panel Assembly TransitionNew
3D & WebGL
  • Fractal Glass Hero
  • Fluid Cursor Canvas
  • Fluid Portrait Hero
  • Fluid Gradient Canvas
  • Inversion Lens HoverNew
UI Elements
  • Circular Widgets
  • Vinyl Cover
  • Image Explosion Footer
  • Accordion Image FramesNew

(Tween) — Motion registry

Animated components & full sites, one command away.

Product

  • Components
  • Templates
  • Installation
  • Guides
  • Blog
  • Contact

Categories

  • Scroll Animations
  • Text Animations
  • Hover & Cursor
  • Sliders & Carousels
  • Galleries & Grids
  • Menus & Navigation
  • Preloaders & Intros
  • Page Transitions
  • 3D & WebGL
  • UI Elements
TWEEN
ease: power2.inOut0.00s
© 2026 TweenBack to topBuilt by mohammad
  1. Docs/
  2. Components/
  3. Fluid Portrait Hero

Fluid Portrait Hero

PreviousNext

A WebGL hero where the cursor paints a decaying fluid trail that blends between two portrait textures, wiping the cover image away to reveal the one beneath.

Open in
fluid-portrait-hero-demo
KAGEMORIKAGEMORI
SHADOW BEFORE COLOUR · 影 · GRADE IN THE DARK · 光 · ONE LIGHT ONE FACE · 色 · SKIN NEVER LIES · 静寂 · FILM IS PATIENCE · 陰影 · KEEP THE GRAIN · 色彩 ·
KAGEMORI影·KAGEMORI光·KAGEMORI色·KAGEMORI静寂·KAGEMORI陰影·KAGEMORI色彩·KAGEMORI影·KAGEMORI光·KAGEMORI色·
KAGEMORI
Colour Studio · K.26
色彩
K.Awards
零Reel
一二三四六七八
Hover to grade
Booking spring reels — 2027
components/ui/fluid-portrait-hero-demo.tsx
import { FluidPortraitHero } from "@/registry/tween/fluid-portrait-hero"

export function FluidPortraitHeroDemo() {
  return <FluidPortraitHero />
}

Installation

pnpm dlx shadcn@latest add https://tweenui.dev/r/fluid-portrait-hero.json

Usage

import { FluidPortraitHero } from "@/components/ui/fluid-portrait-hero"
<FluidPortraitHero
  topImage="https://example.com/portrait-mono.jpg"
  bottomImage="https://example.com/portrait-colour.jpg"
  keyColor="#040d14"
  brandLine1="KAGEMORI"
  ghostWord="KAGEMORI"
/>

A full-bleed orthographic plane is rendered through two shader passes. The first pass simulates a trail: each frame decays the previous frame by decay and adds intensity along the segment between the cursor’s last and current position, ping-ponging between two render targets so the trail accumulates and fades. The second pass samples that trail and uses it as a smoothstep mask to mix between the topImage (shown at rest) and the bottomImage (revealed wherever you have moved), with a cover-fit UV so each portrait fills the frame at any aspect. Pointer input is scoped to the hero element and the renderer is sized to it via a ResizeObserver, so it behaves inside the docs preview and at full screen. When prefers-reduced-motion: reduce is set, a single static frame of the top portrait is rendered with no simulation loop.

Props

PropTypeDefaultDescription
topImagestringmonochrome portraitPortrait shown at rest; the trail wipes it away.
bottomImagestringcolour portraitPortrait revealed wherever the cursor has moved.
brandLine1React.ReactNode"KAGEMORI"First brand line (white).
brandLine2React.ReactNode""Optional second brand line (accent red); hidden when empty.
brandMetaReact.ReactNode"Colour Studio · K.26"Small kicker under the brand.
ringPhrasesstring[]defaultPhrases that orbit the portrait on the curved ring.
tapeTextReact.ReactNode"KAGEMORI"Repeating text on the diagonal banner.
ghostWordstring"KAGEMORI"Huge ghosted wordmark behind the figure (split on space).
rightLabelTopReact.ReactNodedefaultRotated label on the right edge, upper.
rightLabelBottomReact.ReactNodedefaultRotated label on the right edge, lower.
sectionLabelReact.ReactNode"Reel"Active section label in the left rail.
sideTabTitleReact.ReactNode"K."Title on the left edge tab.
sideTabCaptionReact.ReactNode"Awards"Caption on the left edge tab.
backgroundstring"#05090d"Surface color.
accentstring"#c8142c"Accent red used across chrome and the reveal glow.
keyColorstring"#040d14"Knock out a solid photo backdrop by color; "" disables it.
keyThresholdnumber0.08Color distance from keyColor that counts as background.
keySoftnessnumber0.08Softness of the knockout edge.
decaynumber0.985Trail persistence per frame (0–1).
lineWidthnumber0.13Trail thickness in simulation UV space.
classNamestring—Extra classes on the outer section.
Fluid Cursor CanvasFluid Gradient Canvas

On This Page

InstallationUsageProps

Contribute

  • Report an issue
  • Request a feature
  • Edit this page