Skip to content
Playground

Thumbnail

A media preview with independent loading, uploading, and removal states.

A media preview with independent loading, uploading, and removal states.

Turquoise Moraine Lake surrounded by evergreen forest and mountains
Snow-capped Southern Alps reflected in Lake Matheson
Minimal modern building with strong geometric shadows

The examples use photographs from Unsplash by ConfinedRiley, Tim G, and Sebastian Schuster.

TSX
import { Lightbox, Thumbnail } from "@zentara-co/zenos-ui";

Thumbnail defaults to a 64px square. It intentionally has no named size or ratio prop; use className to match the application context. The image always covers the available frame.

Turquoise Moraine Lake surrounded by evergreen forest and mountains
Turquoise Moraine Lake surrounded by evergreen forest and mountains
Turquoise Moraine Lake surrounded by evergreen forest and mountains
Turquoise Moraine Lake surrounded by evergreen forest and mountains

Use className to customize the frame, dimensions, shape, and surface. Scope styles to the stable data-slot attributes when an application needs to refine the image, preview action, loading state, upload overlay, or remove control without replacing Thumbnail behavior.

Loading replaces the preview with a Skeleton while source data is pending. Uploading preserves the available image and overlays a Loader. They are separate states: do not use upload progress to represent an image that has not loaded yet. Missing or failed sources use the image placeholder.

Use each thumbnail’s onClick to set the active gallery index and open Lightbox. Keep index and onIndexChange controlled so selecting a thumbnail and navigating inside Lightbox stay in sync.

onClick turns the image into a preview button. onRemove adds a separate overlaid remove button and stops its click from opening the preview. Thumbnail does not own a viewer; compose it with Lightbox or another application destination.

3 files attached.

Hover visibility keeps dense attachment grids quiet while still revealing the button on keyboard focus and coarse pointers. Use always when removal is the primary task or hidden controls would be difficult to discover.

Turquoise Moraine Lake surrounded by evergreen forest and mountains

Hover

Snow-capped Southern Alps reflected in Lake Matheson

Always

Variants

loadedisLoadingisUploadingdisabledremove: hoverremove: always

API

PropTypeDefaultDescription
src / alt string — Image source and alternative text.
label string — Accessible file name, group label, and native hover title.
isLoading boolean false Replaces preview with a skeleton.
isUploading boolean false Shows upload progress over preview.
disabled boolean false Disables preview and remove interactions.
onClick MouseEventHandler<HTMLButtonElement> — Makes the preview actionable and handles activation.
onRemove MouseEventHandler<HTMLButtonElement> — Shows and handles the independent remove control.
showRemoveOn always | hover hover Controls persistent or interaction-revealed removal.
native props React.HTMLAttributes<HTMLDivElement> — Forwards native attributes, events, aria-*, data-*, className, style, and ref.

Unless narrowed above, each DOM-rendering part also accepts its underlying native or Base UI props, including className, style, aria-*, and data-*.

Use alt to describe meaningful image content. Omit it for decorative media; Thumbnail then hides the image from assistive technology. When the preview is actionable, label, then alt, supplies the button name. A remove action is named “Remove” plus the file label. Loading is decorative; uploading includes a named Loader but applications should announce completion separately when it matters. Disabled preview and remove controls retain native disabled behavior.