Skip to content
nexubDesign System
v2.4.0

Components · Layout

Media Card

BetaSince v1.6.0

An image card with a glass caption over a soft scrim. With `href`, the whole card is one link.

import { MediaCard } from '@nexub/react';

Examples

Ratios

Props

Props
PropTypeDefaultDescription
srcrequiredstring—Image URL. Loaded lazily.
altrequiredstring—Image description. Pass '' when the image is decorative.
ratio'16/9' | '4/3' | '1/1' | '3/4''16/9'Aspect ratio of the image box.
titleReactNode—Caption title, rendered as an h3.
descriptionReactNode—Caption text under the title.
eyebrowReactNode—Small label above the title.
hrefstring—Makes the whole card one link, stretched from the title (so it needs title). Adds the hover lift and image zoom.
childrenReactNode—Actions under the caption. They stay clickable above the stretched link.

Accessibility

ARIA roles

link (when `href` is set)heading level 3 (title)

Keyboard

  • Tab

    Focuses the link (the card shows the focus ring), then any actions.

  • Enter

    Follows the link.

Screen reader

  • With `href`, the link’s name is the title only, not the whole caption.

  • Most card images repeat the title, so `alt=""` is usually right.

On iOS & Android