Media

The Media component is designed to display images or videos, enhancing interfaces by providing graphic or video representations.

Illustration of Media Component

Overview

Use the Media component to add graphics into the interface like image, illustrations, videos, flags, icons or avatars to the interface.

Size and formats

The component can adapt from very small (siez 5) to extra extra large (size 11) sizes, allowing flexibility in design and layout. In total 7 sizes are available.

The component adjusts its design to adapt for differents formats :

  • Square Images: Fill the entire space.

  • Landscape Images: Fit to height.

  • Portrait Images: Fit to width.

  • Custom Sizing: Media dimensions can be customized with specific max and min widths and heights, ensuring optimal display across devices.

How various media format are displayed

Technical specifications

Media comes with an empty state, to be used when no media has been provided. It is also used for loading state.

Hovering over the media reveals a preview icon. Media is clickable, triggering a Lightbox for preview.

Hovering a media

Lightbox

Media appears as a thumbnail image, providing a clean and uniform look across the platform. When a user clicks on the thumbnail, the media opens in a dedicated overlay (called a Lightbox). This Lightbox focuses the viewer’s attention by dimming the rest of the website and presenting the media in a larger, central frame. This feature is especially useful for videos but also allows users to view images in a larger format.

Lightbox

Avatar

The Avatar component adapts to show users or entities. It can display initials, icons, or images, with the name shown when you hover. Clicking triggers actions.

To display multiple avatars, uses component Avatars it automatically handles different colors and spacing.

Disabled avatars show that the user or entity is no longer active.

Guidelines

How to use

  • Enhance content by adding visual representation : Use Media to add value to the content, aiding in user navigation and comprehension without overwhelming the text content.

  • Media to the second plan : Media should never dominate the page or replace textual information, it always has to be used as a complementary source of knowlegde.

How to not use

  • Decorative purpose only: Do not use Media component if it does not add informational value or if it overly clutters the interface.

Accessibility

  • Screen Reader Support: All media must have alt text for screen readers, enhancing accessibility for visually impaired users. For videos, use video tracks with captions. Avoid repeating information already present on the page visually.

  • Captions and Tracks: Adding captions to images and providing track support for videos (with captions, subtitles) is crucial for accessibility and compliance with web standards.

Key takeaways

Last updated

Was this helpful?