Sharingan

Section · scroll

Mosaic zoom

One image fills the screen, then shrinks back into its place at the heart of a mosaic while the other tiles gather around it.

Members

You will find yourself among us

Painters, printmakers, photographers and makers: four thousand members, and room for one more.

Become a member
  • Black and white portrait of a man with a shaved head

    Artist of the monthCollage and print

  • Abstract geometric shapes in orange, blue and grey
  • Mint earphones on a mint and pink background
  • Stylised group portrait of many faces drawn with bold lines
  • A hand holding a small black camera against a pink wall
  • A red rooster with floral patterns on a yellow background
  • A silhouette holding a bottle against purple and pink light
  • Torn layers of colourful paper posters revealing a black and white hand
  • A glass of iced tea with mint leaves
  • Abstract painting with bold red, blue and black strokes
  • Jars of strawberry jam beside fresh strawberries
  • Abstract painting of a blue square over pink and red stripes
  • A colourful bird painted in loose strokes on white

Mosaic zoom

One image fills the screen, then shrinks back into its place at the heart of a mosaic while the other tiles gather around it.

Use when: A featured person or work among many: an artist of the month, a community, a catalogue with a hero piece.

DOM and GSAP (ScrollTrigger, Flip), every browser · pinned for about 1.6 screens

npx shadcn@latest add @sharingan/mosaic-zoom

First time? Add the @sharingan registry to your project: getting started. The CLI also installs gsap, used under GSAP’s own no-charge licence.

Add ?motion=final or ?motion=off to the address for the version without scroll motion; phones below 768 px get it too, with short reveals.

Props

content what the section says, real text in the DOM

Mosaic zoom content
NameTypeDefaultDescription
eyebrowstring (≤ 48 chars)—A short kicker above the headline.
headline *string (8–60 chars)—The section's headline, 3–8 words.
textstring (≤ 200 chars)—One or two sentences under the headline.
ctaobject—
label *string (2–28 chars)—
href *string (≥ 1 chars)—
feature *object—The image that fills the screen first, then takes the mosaic's centre.
src *string (≥ 1 chars)—Portrait images (4:5) fit the tiles best.
alt *string (4–160 chars)—What the image shows, for screen readers.
title *string (2–40 chars)—
metastring (≤ 40 chars)—A second line: a role, a place.
tiles *object[] (8–16)—The tiles around it, four per row beside the feature (twelve fill three rows).
src *string (≥ 1 chars)—Portrait images (4:5) fit the tiles best.
alt *string (4–160 chars)—What the image shows, for screen readers.

config how it moves; attributes on the Web Component

Mosaic zoom config
NameTypeDefaultDescription
lengthnumber (0.8–3)1.6How long the section stays pinned, in screen heights.
spreadnumber (0–1.5)0.7How far out the tiles start, as a share of their distance from the centre.

The same section as a Web Component

Section · scroll

<sg-mosaic-zoom>

The same engine as a Web Component, driven by attributes, on the page’s own HTML.

<sg-mosaic-zoom>

Plain HTML, tiles that start further out, a shorter pin.

  • A hand holding a small black camera against a pink wall

Sharingan is made by Dilane Kombou.

Open source under the MIT licence.