Thumbnail
Thumbnails are compact visual representations of larger images or content. They provide users with a quick preview and help them navigate or select relevant items.
#Purpose
Thumbnails provide users with a quick visual overview of larger content (e.g Snapshot, image). They help users:
- Preview content: Quickly assess if the content is relevant to their needs.
- Navigate: Choose from multiple options without having to open each one.
- Scan: Efficiently browse through a collection of items.
#Examples
#Composition:
- Image: The primary visual element of the thumbnail.
- Container: A surrounding element that defines the thumbnail's boundaries, aspect ratio, and provides optional styling (e.g., borders, shadows).
#Default
<Thumbnail src={image} alt="Screenshot of Siteimprove website in Danish 2020/09/25" />
#Size
- Default (Small): Ideal for displaying multiple items in a compact space (e.g., image galleries, card layouts).
- Medium: Offers a larger preview, providing more detail for items where visuals are important.
- Full-Width: Maximizes visual impact and is often used for featured content or in hero sections.
<Thumbnail
style={{ display: "block" }}
src={image}
alt="Screenshot of Siteimprove website in Danish 2020/09/25"
size="small"
/>
<Thumbnail
style={{ display: "block" }}
src={image}
alt="Screenshot of Siteimprove website in Danish 2020/09/25"
size="medium"
/>
<Thumbnail
style={{ display: "block" }}
src={image}
alt="Screenshot of Siteimprove website in Danish 2020/09/25"
size="fullWidth"
/>
#Link
A link thumbnail is interactive and directs users to the associated content when clicked.
<Link href="https://www.google.com" unstyled openNew>
<Thumbnail zoom src={image} alt="Screenshot of Siteimprove website in Danish 2020/09/25" />
</Link>
#Properties
Property | Description | Defined | Value |
---|---|---|---|
srcRequired | string Src for the thumbnail image | ||
altRequired | string Alt text for the image | ||
zoomOptional | boolean Should thumbnail do a zoom effect on hover | ||
sizeOptional | "fullWidth" | "medium" | "small" Size of the thumbnail, defaults to `"small"` | ||
idOptional | string Id applied to the thumbnail | ||
boolean Indicates whether the element is exposed to an accessibility API. | |||
data-observe-keyOptional | string Unique string, used by external script e.g. for event tracking | ||
classNameOptional | string Custom className that's applied to the outermost element (only intended for special cases) | ||
styleOptional | object Style object to apply custom inline styles (only intended for special cases) |
#Guidelines
#Best practices
#Do not use when
#Accessibility
Explore detailed guidelines for this component: Accessibility Specifications