PRO

Fluid Mosaic

An editorial bento grid whose rows and columns are sized by a gaussian lens centered on the cursor, so the tile you approach swells while its neighbours give up their space. Photographs counter-drift inside their tiles, captions lift on hover, and the area map re-cuts itself for one to twelve items and again on narrow screens. No dependencies.

Component
Editorial
01 / Portrait
Editorial
Form
02 / Study
Form
Motion
03 / Campaign
Motion
Collection
04 / Lookbook
Collection
Objects
05 / Archive
Objects
Volume
06 / Series
Volume
Material
07 / Detail
Material
Afterlight
08 / Story
Afterlight
Install
npx shadcn@latest add https://ui.aryank.space/r/fluid-mosaic.json

Installs from ui.aryank.space. To add it by hand, copy the files in Usage below, or register the @compronents namespace via the docs.

Files

API
PropTypeDefaultDescription
itemsFluidMosaicItem[]Eight editorial photographsUp to twelve tiles, each an image plus an optional title, caption, and link. A tile with a link renders as an anchor.
strengthnumber2.4Peak track weight added at the cursor. 0 freezes the grid even.
radiusnumber0.24Standard deviation of the lens as a fraction of the axis, so how many tracks respond.
smoothnessnumber0.11Fraction of the remaining distance covered each frame. Clamped to 0.015 to 0.35.
parallaxnumber18Pixels the photographs counter-drift, and the amount each is oversized by so no edge shows.
imageScalenumber1.08Constant zoom on every photograph.
gap / radiusCorners / backgroundnumber | number | string10, 18, #0D0D0DGrid gutter (also used as the outer padding), tile corner radius, and the colour behind the tiles.
overlayColor / overlayOpacitystring | number#000000, 46Scrim over each photograph, at 34% of this opacity at rest and 72% on the hovered tile.
showText / textColor / textGap / textPaddingboolean | string | number | numbertrue, #FFFFFF, 5, 22The caption and title block in the corner of each tile. Turning it off also removes the scrim.
titleFont / captionFontCSSPropertiesInter 28/600 and Inter 11/500 uppercaseStyle objects spread onto the two text lines.
mobileBreakpoint / mobileColumnsnumber | 1 | 2620, 2Root width at or below which the compact area map takes over, and how many columns it uses.
animatebooleantrueSet false for an even grid with no rAF loop, for static rendering or reduced motion.
Customize
strengthtext

How hard the lens pulls. 0 is an even grid, 2.4 is the default swell.

radiustext

Lens width as a fraction of the grid. Small values move one track, large values bend everything.

Dependencies
None.