Thumbnail
Base visual thumbnail component for colors and images. Used as the visual foundation for VariantSelectorItem, image upload previews, and decorative illustrations. Handles all visual states (selected, muted, dotted) while leaving interactivity to parent wrappers.

Usage
import { Thumbnail, ThumbnailFrameRing, ThumbnailProps, ThumbnailSize, ThumbnailVariant } from "@desk/ui/components/thumbnail";Best practices
Thumbnailis display-only — it handlesselected/muted/disabledvisuals but no click semantics; wrap it in abutton/VariantSelectorItemfor interaction.Content precedence is
children>src>color: pass anext/imageaschildrenfor optimized loading, usesrc+altfor a plain<img>, orcolorfor a solid swatch.Give a meaningful
altfor content images; passalt=""(the default) only for decorative swatches so screen readers skip them.Pick
variant="card"for selectable framed tiles andvariant="bare"for dense grid cells;sizeaccepts a scale token, a pixel number, or"fluid"to fill the parent — don't wrap it in a fixed-size box to resize.
Props
Thumbnail
| Prop | Type | Default | Description |
|---|---|---|---|
| alt | string | undefined | Alt text for the image (used when | |
| borderColor | string | undefined | Border color override (e.g., "white" for decorative use) | |
| children | ReactNode | Custom content — takes precedence over | |
| className | string | undefined | Additional className for the outer container | |
| color | string | undefined | Background color (solid fill, no image) | |
| compactRadius | boolean | undefined | Use a slightly lighter corner radius profile (useful for dense selectors) | |
| disabled | boolean | undefined | Disabled state - blocks interaction, reduced opacity | |
| dotted | boolean | undefined | Dotted border style (e.g., for pending/preview states) | |
| framed | boolean | undefined | false | Show a subtle inset hairline ring ( |
| muted | boolean | undefined | Muted state - reduced opacity, restores on hover | |
| padded | boolean | undefined | true (for card variant), false (for bare variant) | Show the white inset ring - card style with a solid inner border that frames the image/color. Drawn as an inset box-shadow overlay (follows the container radius, so it is always uniform). When false: image fills edge-to-edge. |
| priority | boolean | undefined | Prioritize image loading for above-the-fold or interactive CTAs | |
| selected | boolean | undefined | Selection state - shows primary border + elevated shadow (card variant only) | |
| size | ThumbnailSize | undefined | Size - ComponentSize scale ("xs", "base", "2xl") or pixel number (58, 88) | |
| sizes | string | undefined | Responsive size hint forwarded to the underlying | |
| src | string | undefined | Image source URL — renders a native | |
| style | import("react").CSSProperties | undefined | Inline styles (useful for motion animations) | |
| variant | ThumbnailVariant | undefined | "card" | Visual style variant. - "card": Border, shadow, and optional padding (for selectable items) - "bare": Simple container with muted background (for data grids, etc.) |
ThumbnailFrameRing
| Prop | Type | Default | Description |
|---|---|---|---|
| radius | string |
Also exports
- interface
ThumbnailProps - type
ThumbnailSize - type
ThumbnailVariant
Composition
Used by