StyleKit

Horizontal Gallery

横滚画廊

Rate this style

A white-cube, curator-style portfolio layout. Borderless large images line up along a horizontal snap-scroll rail; whitespace acts as the gallery wall, numbered hairline captions echo museum labels, and viewing becomes a walk.

horizontal galleryhorizontal scroll websitescroll snapwhite cubeart gallery websitemuseum websitephotography portfolioexhibition websitecurated showcaseminimal gallery

Best For

horizontal gallery / horizontal scroll website / scroll snap

Primary Move

Build the gallery strip with overflow-x-auto snap-x snap-mandatory, each work shrink-0 snap-start

Watch Out

Never add shadows, rounded corners, or borders to artwork images (works must hang clean on the wall)

design.md

Horizontal Gallery as a design document

One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.

Document view

Horizontal Gallery — Style Reference

A white cube: works line up along one horizontal rail, and viewing becomes a walk.

Theme: light

Horizontal Gallery imitates a museum's white cube: works line up along one horizontal snap rail (overflow-x auto, snap-x mandatory, each shrink-0 snap-start), whitespace acts as the wall, and captions sit outside and below each image at 12px uppercase 0.2em in grey with a No. 01 index. The section title becomes the rail's first cell, sticky at the left so it accompanies the scroll. Every rule points at keeping the work undistracted — no shadow, radius or border on an image, no type on top of a work, no heavy borders, no decorated wall, no saturated multicolor, with terracotta as the one restrained accent.

Colors

NameValueTokenRole
Ink#1a1a1a--color-inkHeadings and primary text — the color of a wall label.
Gallery White#fcfcfa--color-gallery-whiteThe page ground — a faintly warm white, like a freshly painted wall.
Terracotta#a85a3a--color-terracottaThe only accent, appearing sparingly on indices, links and selection marks.
Stone#8a8a85--color-stoneCaptions, indices and metadata — the lowest tier while staying readable.
Hairline#e8e6e1--color-hairlineEvery 1px hairline, and never thicker than 1px.
Dark Stone#2e2e2c--color-dark-stoneInverted section grounds for about pages and the footer.

Typography

Cormorant Garamond — Headings in a light serif on wide tracking; hierarchy comes from size and tracking, never from bold.
  • Substitute: Georgia, 'Songti SC', serif
  • Weights: 300, 400
  • Sizes: 22, 28, 36, 48, 64
  • Line height: 1.1 (display), 1.2 (headings), 1.6 (body)
  • Letter spacing: 0.02em on display, 0.2em on uppercase labels
Inter — Body and captions in a light sans at 12 to 15px, letting the works hold all the attention.
  • Substitute: system-ui, 'Helvetica Neue', sans-serif
  • Weights: 300, 400
  • Sizes: 12, 13, 15
  • Line height: 1.5 (display), 1.5 (headings), 1.7 (body)
  • Letter spacing: 0.02em on display, 0.2em on uppercase labels
Type Scale
RoleFamilyWeightSizeLine HeightLetter SpacingToken
displayCormorant Garamond30064px1.10.02em--text-display
headingCormorant Garamond30048px1.15—--text-heading
subheadingCormorant Garamond40036px1.25—--text-subheading
body-lgInter30015px1.7—--text-body-lg
bodyInter30013px1.7—--text-body
labelInter40012px1.50.2em--text-label

Spacing & Layout

Base unit: 8px Density: airy

Spacing Scale
NameValueToken
88px--spacing-8
1616px--spacing-16
2424px--spacing-24
3232px--spacing-32
4848px--spacing-48
6464px--spacing-64
9696px--spacing-96
128128px--spacing-128
Border Radius
ElementValue
cards0
buttons0
media0
  • Page max-width: 1440px
  • Section gap: 160px
  • Card padding: 0px
  • Element gap: 24px

Components

Snap Rail

Role: The snap rail — the core structure

The container uses overflow-x auto with scroll-snap-type x mandatory, hiding the scrollbar while keeping keyboard and touch scrolling. Each work is shrink-0 with scroll-snap-align start and 64px gaps. A 1px hairline runs above and below the rail.

  • Sizes: gap 64px between works
Gallery Cell

Role: The gallery cell

The image takes a viewport share (42vw desktop, 60vw tablet, 82vw mobile) with height following its native ratio, and no radius, border or shadow. The caption sits 16px below: a 12px uppercase 0.2em stone index (No. 01) followed by title and year. Captions never appear on the image.

  • Sizes: 42vw desktop / 60vw tablet / 82vw mobile
Sticky Title

Role: The sticky section title — the first cell

The rail's first cell, sticky at the left edge on the page's own ground, 320px wide with a 1px hairline on its right. The title runs 48px light serif above a 12px uppercase section number. It stays put through the scroll, naming the section.

Hairline Caption

Role: Captions and metadata

12px at 0.2em tracking, uppercase, in stone #8a8a85. The format is fixed: No. 01 / title / year / medium, with the index in terracotta. It imitates a museum label and is never bolded or stripped of its number.

Wall Rule

Role: The wall rule

1px in #e8e6e1, spanning the content width and inset 24px at each end. It divides one section's rail from the next. Nothing at 2px or above is permitted — a heavy line turns a gallery wall into a table.

Do's and Don'ts

Do
  • Snap horizontally with snap-x mandatory
  • Every work carries a No. 01 index and a label
  • Every divider is exactly 1px
  • The section title sticks at the rail's left
  • Light serif headings with hierarchy from tracking
  • Terracotta is the only accent, used sparingly
Don't
  • No shadow, radius or border on a work image
  • Never put type on a work image
  • Never mix a masonry column into the rail
  • No border at 2px or above
  • No decorated wall: gradients, texture, color blocks
  • No saturated multicolor decoration

Surfaces

LevelNameValuePurpose
0Gallery White#fcfcfa展墙
1Dark Stone#2e2e2c反色区块

Elevation

  • None: none — a shadow would mount the work on the wall

Imagery

The works are the only content, and they must be high quality with precise crops and no filter. Varied sizes and ratios are welcome — that variation is the gallery's rhythm — but every work carries an index and a label. No decorative illustration, background texture or multicolor graphics.

Layout

Capped at 1440px with 32px rail padding and 160px between sections. Vertically the page is nearly all emptiness; the content lives horizontally. On mobile the rail drops to 82vw so one work shows at a time.

Agent Prompt Guide

Implementation Contract
  • Use the requested page, user task and real content as the brief. Implement only the requested scope; identify missing business information instead of inventing data or capabilities.
  • Inspect the current project, stack and components first. Reuse its structure, routes, dependencies and components; do not rebuild unrelated pages or features.
  • Use the project's breakpoints to adapt columns and spacing for narrow and desktop screens. Preserve hierarchy and prevent accidental horizontal overflow.
  • For interactions in scope, support keyboard focus and reduced motion, with applicable disabled, loading, empty and error states.
  • Run the project's existing checks after implementation. Report only tests and visual checks actually run, and list unverified behavior.

QUICK COLOR REFERENCE:

  • text: #1a1a1a
  • background: #fcfcfa
  • accent: #a85a3a
  • stone: #8a8a85
  • hairline: #e8e6e1
  • dark: #2e2e2c

EXAMPLE COMPONENT PROMPTS:

  1. Build a horizontal gallery: a container with overflow-x auto and scroll-snap-type x mandatory, bounded by 1px #e8e6e1 hairlines above and below. Each work is shrink-0 with scroll-snap-align start, 64px gaps and a 42vw width (82vw on mobile), with no radius, border or shadow. A 12px uppercase 0.2em caption sits 16px below in the format No. 01 / title / year, its index in terracotta #a85a3a and the rest in #8a8a85. The section title is the first cell, sticky at the left, 320px wide in 48px light serif. The page ground is #fcfcfa.

Similar Brands

  • Luxe Lookbook — Both restrained showcases, though the lookbook is a vertical grid while this is a horizontal rail
  • Masonry Flow — Both portfolios, though masonry uses varying heights while the gallery uses horizontal rhythm

Quick Start


:root {
  /* Colors */
  --color-ink: #1a1a1a;
  --color-gallery-white: #fcfcfa;
  --color-terracotta: #a85a3a;
  --color-stone: #8a8a85;
  --color-hairline: #e8e6e1;
  --color-dark-stone: #2e2e2c;

  /* Typography — Font Families */
  --font-serif: 'Cormorant Garamond', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Typography — Scale */
  --text-display: 64px;
  --leading-display: 1.1;
  --tracking-display: 0.02em;
  --text-heading: 48px;
  --leading-heading: 1.15;
  --text-subheading: 36px;
  --leading-subheading: 1.25;
  --text-body-lg: 15px;
  --leading-body-lg: 1.7;
  --text-body: 13px;
  --leading-body: 1.7;
  --text-label: 12px;
  --leading-label: 1.5;
  --tracking-label: 0.2em;

  /* Typography — Weights */
  --font-weight-light: 300;
  --font-weight-regular: 400;

  /* Spacing */
  --spacing-unit: 8px;
  --spacing-8: 8px;
  --spacing-16: 16px;
  --spacing-24: 24px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-96: 96px;
  --spacing-128: 128px;

  /* Layout */
  --page-max-width: 1440px;
  --section-gap: 160px;
  --card-padding: 0px;
  --element-gap: 24px;
  --density: airy;

  /* Border Radius */
  --radius-cards: 0;
  --radius-buttons: 0;
  --radius-media: 0;

  /* Surfaces */
  --surface-gallery-white: #fcfcfa;
  --surface-dark-stone: #2e2e2c;
}

Community

Ratings & Feedback

No ratings yet - be the firstSign in to rate

Loading comments…

Component Templates

Component Preview

Button

FAQ

Horizontal Gallery — Frequently Asked Questions

What is the Horizontal Gallery design style?
A white-cube, curator-style portfolio layout. Borderless large images line up along a horizontal snap-scroll rail; whitespace acts as the gallery wall, numbered hairline captions echo museum labels, and viewing becomes a walk. Its core principle: Horizontal Gallery imagines the page as a white-cube museum: viewing is not an infinite downward feed but a forward walk along an exhibition line, pausing in front of each work.
What colors does Horizontal Gallery use?
Horizontal Gallery uses #1A1A1A as its primary color and #FCFCFA as its secondary color, with accent colors #A85A3A, #8A8A85, #E8E6E1, #2E2E2C. Every hex value can be copied from the palette on this page.
How do I apply Horizontal Gallery correctly?
Key practices: Build the gallery strip with overflow-x-auto snap-x snap-mandatory, each work shrink-0 snap-start. Artwork images are always rounded-none with no border and no shadow, object-cover inside aspect-[4/5] or aspect-[3/2]. Give every work a No. 01 / Fig. 01 index and a hairline caption text-xs uppercase tracking-[0.2em] text-[#8A8A85] below the image.
What are common mistakes with Horizontal Gallery?
Avoid: Never add shadows, rounded corners, or borders to artwork images (works must hang clean on the wall). Never place text on top of artwork; captions live only below the image. Never mix vertical masonry or multi-row grids inside the horizontal strip.
How do I prompt AI to generate Horizontal Gallery UI?
Copy the ready-made AI prompt on this page — it bundles the design tokens and component rules — and paste it into ChatGPT, Claude, Claude Code, or Codex. Effective prompts include the keywords: horizontal gallery, horizontal scroll website, scroll snap, white cube.
Global Styles

Global CSS

css
/* Horizontal Gallery Global Styles */

/* Signature horizontal strip: snap scroll with hidden scrollbar */
.hgallery-strip {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.hgallery-strip::-webkit-scrollbar {
  display: none;
}

.hgallery-item {
  flex-shrink: 0;
  scroll-snap-align: start;
}

.hgallery-item--center {
  scroll-snap-align: center;
}

/* Sticky title cell that walks along with the strip */
.hgallery-sticky-title {
  position: sticky;
  left: 0;
  z-index: 10;
  background: #FCFCFA;
}

/* Museum wall label caption */
.hgallery-caption {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #8A8A85;
}

.hgallery-index {
  font-size: 0.625rem;
  text-transform: uppercase;
  letter-spacing: 0.25em;
  color: #A85A3A;
}

/* Hairline rules */
.hgallery-hairline {
  border-color: #E8E6E1;
  border-width: 1px;
}

/* Hairline scroll progress track */
.hgallery-progress {
  position: relative;
  height: 1px;
  background: #E8E6E1;
}

.hgallery-progress-thumb {
  position: absolute;
  top: 0;
  left: 0;
  height: 1px;
  background: #1A1A1A;
  transition: width 0.2s ease-out;
}

/* Horizontal Gallery Design Tokens */
:root {
  --horizontal-gallery-wall: #FCFCFA;
  --horizontal-gallery-ink: #1A1A1A;
  --horizontal-gallery-ink-soft: #2E2E2C;
  --horizontal-gallery-muted: #8A8A85;
  --horizontal-gallery-hairline: #E8E6E1;
  --horizontal-gallery-terracotta: #A85A3A;
}

@keyframes horizontal-gallery-fade-in {
  from { opacity: 0; transform: translateX(16px); }
  to { opacity: 1; transform: translateX(0); }
}

.horizontal-gallery-animate-in {
  animation: horizontal-gallery-fade-in 0.6s ease-out both;
}

Compatible Visual Styles

Try Pairing

Horizontal Gallery is a layout pattern that can be paired with the following visual styles.

Related Styles

Related Styles

Explore these styles for ready-made tokens and components.

Horizontal Gallery and Dark Gallery sit closest to each other. The table below gives the real differences in color, use case, and tags, so the choice between them is made on facts.

AttributeHorizontal GalleryDark Gallery
Primary color#1A1A1A#0A0A0A
Secondary color#FCFCFA#FFFFFF
Best forhorizontal gallery / horizontal scroll website / scroll snapphotography / gallery / dark
Unique tags—dark-theme
Design Philosophy

Horizontal Gallery imagines the page as a white-cube museum: viewing is not an infinite downward feed but a forward walk along an exhibition line, pausing in front of each work.