Media
The Media component is designed to display images or videos, enhancing interfaces by providing graphic or video representations.
Overview
Use Media component to add a graphic representation - such as a photo, illustration or video - into the interfaces.
Size and formats
The component can adapt from very small (xxxs) to extra extra large (xxl) sizes, allowing flexibility in design and layout. In total 8 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.
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.
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.
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
Context is crucial: media should add value to the related content.
Use the right component size considering the whole page design
Provide descriptive Alt-text for screen readers and captions for all other users
Use
Media
with no context to itRepeat information in your alt text that is already on the page.
Last updated