| # | Required | Element | Description |
|---|---|---|---|
| 1 | Image | The rendered image or custom icon. Displays the image source at the specified dimensions. |
The Image component is the standard method to display any raster or vector assets within the UI. Common use cases include:
When a specific icon doesn't exist within the Pluma Icon library, use Image to display a custom icon. Set its preset size and object-fit so the Image occupies the same dimensions as an Icon. Pair with the bounding box option to match the inner spacing icons use.
When Images appear in a group with other Images or Icons, ensure they are all the same size. Mixing sizes disrupts visual rhythm and makes the layout feel inconsistent.
The bounding box is an invisible box that surrounds and contains the image. When enabled, it adds proportional padding based on the image's size to keep adjacent images visually aligned.
Padding scales proportionally with size to match sibling image dimensions.
The Image fills the entire size, making it visually larger than a same-sized icon.
Object fit controls how the image is resized within its container when the container's aspect ratio differs from the image's intrinsic aspect ratio.
Images are scaled to fit entirely within the container with their aspect ratios preserved. Useful for logos and icons that should never be cropped.
Images are scaled and possibly cropped to fill the container's aspect ratio. Useful for hero images and thumbnails.
Images are stretched to match the container's dimensions exactly. The image's aspect ratio is ignored.
Similar to contain, but images are never scaled larger than their intrinsic size.
Image supports preset sizes that align with the Icon sizing scale. Use these when Images need to sit alongside Icons at the same visual weight and alignment.
When no preset size is set, the image renders at its natural dimensions or any explicit width and height values.
Sizes follow the icon scale so Images and Icons can be used interchangeably.
When placed inside a Coin, Image automatically inherits the Coin's size, object-fit, and bounding box settings. This means an image used as a Coin's content doesn't need any additional sizing configuration.
The Image component supports color schemes. For each source provided, it can be associated with a specific color scheme to be displayed when a theme is toggled on. This is helpful for graphics or logos that have light and dark variations.
Each image source can be associated with a particular browser color scheme.
Images can be displayed inline with surrounding text. When inline, the image automatically adjusts its vertical alignment to sit comfortably alongside uppercase or lowercase letters, matching the behavior of inline icons.
The image aligns vertically with the surrounding text baseline.
Alt text is written depending on how the Image is used. Every Image falls into one of three categories: decorative, functional, or informative.
Every Image must have an alt attribute. Consider the following examples for writing appropriate alt text:
| Role | Alt text | Example |
|---|---|---|
| Decorative | Empty string | "" |
| Functional | Describe the action or destination | "Customer.io homepage" |
| Informative | Describe what the image communicates within context | "Bar chart showing delivery rate over time" |
For more information from an accessibility standpoint, see Effective alt text under the Accessibility tab.