Skip to content

Product gallery

A main image with clickable thumbnails, pure CSS, keyboard-friendly, up to six images.

Gallery

Installation

Everything ships in one stylesheet. There is nothing to import per component.

<link rel="stylesheet" href="https://mian.ro/dist/mian.css">

Prefer to own the files? /r/product-gallery.json is a registry item with this component's CSS and example markup, ready to copy into your project with any tool that reads the open registry-item format.

Class reference

Class / attributeDescription
mn-galleryThe wrapper, with one radio input per image first.
mn-gallery-mainThe large images (mn-media), in the same order as the radios.
mn-gallery-thumbsThe thumbnails: one <label for> per radio.
mn-gallery-thumbA thumbnail label.

Accessibility

  • The radios are a real group: Tab to it, then arrow keys switch images. Name the group (role="group" aria-label) and each radio (aria-label).
  • Give the main images alt text; thumbnails repeat them, so their images can be decorative.
Choose a noodle

Minimal

Flat

Pixel

Linear

Thin

Glass

Textured

Bold

Elegant

Rounded

On this page