Thumbnail
v0.64.0, changelogOne small square picture for a row, list or card at sm, md or lg: lazy and object-cover, with ImageGrid's fallback when it fails and a restricted placeholder that fetches nothing.
In table
Install
npx shadcn add @syncrobotic/thumbnail Also installs: lucide-react@^1, @syncrobotic/cn, @syncrobotic/tooltip
Overview
When to use
- The first column of a table of datasets, recordings or captures.
- The picture at the start of a list row or a card's row.
- A row from restricted data (faces, number plates, a tier):
restrictedwith itsreason. - The cells of a media card's mosaic, filling CardMedia.
Use something else
- Many pictures to browse, open or pick: Image grid.
- One large preview someone may choose to reveal: Restricted preview.
- A person or a robot: Avatar.
More examples
States and real uses. Each example is also a Storybook story and a visual regression test.
Sizes
States
Zh tw
Usage rules
- One small picture at the start of a table row, a list row or a card's row. Many pictures to browse or open: ImageGrid.
- Sizes come from the control scale:
sm(--h-sm, 36 px, 44 on touch) in a table,md(--h-md, 44),lg(--h-lg, 48) in a list or a card. Never a size of your own. - Give
altwhat the picture shows, oralt=""when the row's own words already say it. - A row the viewer may not see (faces, number plates, a restricted tier) is
restrictedwith areason: the neutral placeholder, named by the reason, with nothing fetched. Never a warning colour: restricted is a property of the data. - The reason is a hover tooltip and the placeholder's accessible name; touch screens show no tooltip, so where the reason matters, say it in the row too (a TierBadge).
- It is not a control and never takes focus: make the row, or a link in it, the target.
Changelog
- 0.64.02026-12-01Formatted with Prettier (class order sorted); the code is unchanged.
- 0.58.02026-11-28Stable: shipped ten releases with no breaking change, with unit tests, measured accessibility (components) and use/instead docs. Its API now changes only after a release deprecates what goes, with a migration line.
- 0.53.02026-11-27Its doc opens with its description, word for word; the code is unchanged.