Appica UIUI 1.0.0

Thumbnail

A small preview tile for an image or icon, with a fallback when the image is missing.

Usage

Thumbnail is a compact preview tile — the small square you see beside a file, a list row, or a media item. A single component covers both jobs:

  • Image (variant="image", the default) — shows src cropped to fill, preloading it like an Avatar and dropping to a placeholder icon if the image is missing or fails.
  • Icon (variant="icon-*") — a colored tile that frames an icon you pass as children, in soft, outline, primary, and the semantic accent colors.

Everything is sized in em from a single size, so the tile and its icon scale together. Use a preset (2xs2xl) or a pixel number, and pick a rounded square or a full circle with shape.

Examples

Default

The image variant. The src is cropped to fill the square; give it an alt that describes the picture.

Sizes

Seven presets run from 2xs to 2xl. Because the tile is sized in em, a fallback or icon inside scales right along with it.

Custom size

Pass a number to size for an exact pixel dimension when a preset doesn't fit — it drives the tile's font-size, so everything inside stays proportional.

Shape

shape="rounded" (the default) is a squircle-style rounded square; shape="circle" clips the image to a full circle.

Icon variants

The icon-* variants drop the image and frame an icon child instead — icon-soft and icon-outline for neutral tiles, icon-primary and icon-primary-outline for the brand color, and icon-secondary / icon-error / icon-success / icon-warning / icon-info for the semantic accents.

Fallback

When the image is missing or fails to load, the image variant falls back to a built-in placeholder icon — no broken-image glyph ever flashes.

Media list

Thumbnails shine next to text. Mix an image tile with icon tiles down a list so files, folders, and media share one consistent rhythm.

Next.js Image

To serve an optimized image, pass a Next.js <Image> to the render prop. The wrapper lifts the src so the preloader still drives the fallback, and applies its own object-cover and rounded-corner classes. Give the Image a width/height matching the tile's pixel size.

Loading

onLoadingStatusChange reports the image's lifecycle, so you can overlay a Skeleton while it loads and drop it once the photo arrives. Press Reload to fetch a fresh copy and watch it again.

RTL

Every Appica UI component supports right-to-left layouts out of the box. Set the dir attribute on a container (commonly your <html> element) so CSS logical properties resolve correctly, and wrap your tree in DirectionProvider so direction-aware behavior follows the same direction.

The tile itself is symmetric, so it looks the same in either direction; what flips is the surrounding layout — in a media row the thumbnail moves to the right and the text to its left. For setup details and caveats, see the RTL guide.

  • القمة.jpgصورة · ٢٫٤ ميغابايت
  • ملاحظات ميدانيةمجلد · ١٨ عنصرًا
  • المسار.mp3صوت · ٣:٤٢

API reference

Thumbnail is a single component. For the image variant it builds on Base UI's Avatar to preload the source and manage the fallback; the icon variants render a plain tile. It forwards ref and remaining attributes to the root element.

Accessibility

  • For a meaningful image, give it an alt that describes the picture; for a purely decorative thumbnail, use alt="".
  • The icon variants are decorative tiles — the icon child carries no accessible name on its own, so make sure the surrounding context (a filename, a label) names what the thumbnail represents.
  • The built-in fallback icon is marked aria-hidden; the alt text is what's announced when the image can't load.
  • Pass an explicit width/height to a rendered Next.js <Image> so the layout doesn't shift while the image loads.

© 2026 Appica UI. A free component library, crafted by the Appica team.