MediaGalleryHero

Composable responsive media hero primitives for image and video gallery entry points.

Quick Preview

Modern home exterior with large windows
Interior lounge with warm finishes
Dining room and kitchen
Bedroom with natural light
Second bedroom
Bathroom with walk-in shower
Garden and rear patio
1/7

Usage

import {
	MediaGalleryHero,
	MediaGalleryImages,
	MediaGalleryIndicator,
	MediaGalleryReview,
} from "@giddaa-housing/ui/media-gallery-hero";

<MediaGalleryHero>
	<MediaGalleryImages images={images} imageCount={4} />
	<MediaGalleryReview rating={4.8} reviewCount={23} />
	<MediaGalleryIndicator totalMediaCount={35} />
</MediaGalleryHero>;

Examples

Layouts

Use imageCount to control the desktop and tablet bento arrangement. Mobile switches to a swipeable carousel with compact gallery chrome.

imageCount is a layout choice, not a cap: the grid lays out at most four tiles, while the carousel carries every image in images and its counter reads the number of slides. Pass a bigger library figure to MediaGalleryIndicator when the hero links out to a fuller gallery — View All 35 Photos labels that link, and does not claim the carousel holds 35.

Modern home exterior
Lounge interior
Kitchen and dining area
Bedroom interior
1/4
Modern home exterior
Lounge interior
Kitchen and dining area
Bedroom interior
1/4
Modern home exterior
Lounge interior
Kitchen and dining area
Bedroom interior
1/4
Modern home exterior
Lounge interior
Kitchen and dining area
Bedroom interior
1/4

Video

Use MediaGalleryVideo for a video hero surface. It can render a native video, a poster thumbnail with a centered play button, or custom media through renderMedia.

Use inline playback when video is the hero's primary experience. When the hero is only an entry point—or when playback includes a title, description, or playlist—open Video Player Dialog from onPlayClick instead.

Props

Prop/APITypeDefaultDescription
MediaGalleryHeronative div props-Positioned shell with fixed responsive hero height and rounded clipping.
MediaGalleryImagesimages, imageCount, currentMedia, showMobileIndicator, onMediaClick, renderMediaimageCount=4Owns the desktop bento grid and mobile carousel. Missing src renders a neutral placeholder.
imageCount on MediaGalleryImages1 | 2 | 3 | 44Bento arrangement for the desktop grid. It is a layout choice, not a cap on the media set — the mobile carousel always carries every image in images.
totalMediaCount on MediaGalleryImagesnumber-Deprecated — no longer read. The carousel counter counts its own slides. Pass a larger library figure to MediaGalleryIndicator instead.
MediaGalleryVideosrc, poster, alt, label, native div props, native video behavior props, onPlayClick, renderMedia-Full video surface with centered play control unless controls is enabled.
MediaGalleryReviewReviewBlock propssize="xs", bordered=falsePositioned review badge wrapper.
MediaGalleryIndicatorbutton props, label, totalMediaCount, sizegenerated labelPositioned desktop gallery indicator. It renders as a button when onClick is provided.

Accessibility

  • Provide descriptive alt text for each image.
  • Use onClick on MediaGalleryIndicator when the indicator opens a full gallery; otherwise it renders as static chrome.
  • Keep routing, data fetching, authorization, and product-specific copy in the consuming app.
  • Prefer Video Player Dialog over building a separate modal player when a gallery video should open above the page.

On this page