Face Magnifier
A grid of small portraits with a lens that follows the pointer: tiles under it grow, spread apart and regain their color, and a click opens one in the centre.
pixikit.com/docs/components/face-magnifier
Customize
Preset
Columns12
Tile size0.36
Magnify1.50×
Lens size1.30
Fill0.92
Radius0.14
Saturation0.00
Dim0.25
Follow0.45s
Autoplay
Autoplay speed1.00
Open on click
Captions
Interactive
Background color
Seed0
Paused
Props
26| Name | Type | Default | Description |
|---|---|---|---|
items | FaceMagnifierItem[] | DEFAULT_ITEMS | The portraits; they repeat to fill the grid. |
preset | "studio" | "mosaic" | "loupe" | "wide" | "colour" | "dots" | "studio" | A named setup. Values you leave at their defaults follow it. |
columns | number | 12 | Tiles per row. |
tileSize | number | 0.36 | Resting tile size, as a share of its cell. |
magnify | number | 1.5 | How much the tiles under the lens grow and spread. |
lensSize | number | 1.3 | Reach of the lens, in cells. |
fill | number | 0.92 | How much of its enlarged cell a magnified tile fills. |
radius | number | 0.14 | Corner rounding, as a share of the tile; 0.5 makes circles. |
saturation | number | 0 | Color left in tiles outside the lens; 0 is black and white. |
dim | number | 0.25 | How much tiles outside the lens fade. |
follow | number | 0.45 | Seconds the lens takes to catch up with the pointer. |
autoplay | boolean | true | When the pointer is away, the lens drifts across the grid on its own. |
autoplaySpeed | number | 1 | Speed of the drifting lens. |
openOnClick | boolean | true | Clicking a tile opens its photo large in the centre. Click again or press Escape to put it back. |
captions | boolean | true | Shows the title and subtitle of the opened photo. |
interactive | boolean | true | Lets the pointer and keyboard steer the lens. Arrow keys move it tile by tile; Enter opens the tile under it. |
backgroundColor | string | "transparent" | Color behind the grid. |
seed | number | 0 | Changes which portrait lands on which tile. |
paused | boolean | false | Freezes the drifting lens. |
dpr | number | 2 | Kept for parity with canvas galleries; this one is drawn by the browser at its own pixel ratio. |
ariaLabel | string | "Portrait grid" | Label announced for the grid. |
onOpen | (item: FaceMagnifierItem, index: number) => void | None | Called when a photo is opened. |
ref | Ref<FaceMagnifierHandle> | None | Handle with open, close and focusAt. |
children | ReactNode | None | Content laid over the grid. |
className | string | None | |
style | CSSProperties | None |