Zephora UI

Data

Image

Enhanced img element with error fallback, fixed aspect ratio, object-fit control, lazy loading and a full-screen preview lightbox with zoom.

Import

import { Image } from "@zephora/react";

Examples

Aspect ratio and fit

Purple abstract artwork

Fallback

`fallback` renders instead of the image when loading fails.

Missing photo

Preview lightbox

With `preview`, click (or Enter) opens a modal lightbox with zoom in/out and close controls.

API

Image props

PropTypeDefaultDescription
srcstringImage source URL.
alt *stringAlternative text — required for accessibility.
fallbackReactNodeRendered instead of the image when it fails to load.
aspectRationumberFixed width/height ratio applied to the wrapper (e.g. 16 / 9).
fit"cover" | "contain" | "fill""cover"Object-fit behavior.
radiusnumber | stringCorner radius (px number or any CSS length).
lazybooleanfalseUses native loading="lazy".
previewbooleanfalseClick (or Enter) opens a full-screen lightbox with zoom controls.
unstyledbooleanfalseHeadless mode — skips Zephora styling.

Keyboard

KeyAction
Enter / SpaceOpens the preview lightbox when `preview` is set.
EscapeCloses the preview lightbox (focus is trapped inside).