Staaarter

Salon Hang Wall

A tightly packed salon-style wall of works in four different grid spans, with no labels on the panel itself. Opening a work shows it centered in a passe-partout mat; the viewer's own full-height left and right margins act as the previous/next click zones, so browsing feels like stepping along the wall rather than pressing a button.

By Staaarter Team
Gallery
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its media-slot dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/salon-hang-wall.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/gallery/gallery10.tsx instead.

Usage

The file also exports gallery10Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Gallery10, gallery10Demo } from "@/components/blocks/gallery/gallery10";

export default function Page() {
  return <Gallery10 {...gallery10Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall label above the heading; omitted entirely when unset.
headingReactNodenoneSection heading.
descriptionstringundefinedSupporting copy under the heading.
worksGallery10Work[]noneSalon wall works; `span` picks one of four preset grid footprints.
classNamestringundefinedExtra classes for the outer section element.

Types

type Gallery10Span = 1 | 2 | 3 | 4;

interface Gallery10Work {
  alt: string;
  span: Gallery10Span;
  image?: { src: string; alt: string };
}

Behavior notes

  • Real client-side state: `openIndex` (number | null) tracks which work the viewer is showing via useState, starting at null so the viewer is closed on mount.
  • The viewer's left and right quarter-width regions are real `<button>` elements covering the full height of the screen (`inset-y-0 w-1/4`) that call the same previous/next handlers as ArrowLeft/ArrowRight; each shows a chevron only on hover so the click zone stays visually quiet, matching a passe-partout mat rather than a toolbar.
  • Escape closes the viewer and Left/Right arrow keys navigate, wired through a keydown listener registered in useEffect only while a work is open, removed on close/unmount.
  • The grid panel and works themselves show no titles or captions (a genuinely label-free salon wall); every thumbnail and viewer control still carries a real `aria-label` for accessibility even though nothing is printed on screen.
  • "use client" component, so its demo props live in the sibling gallery10.demo.tsx file per this repo's client/demo-file-split rule, not in gallery10.tsx itself.