Best For
horizontal gallery / horizontal scroll website / scroll snap
横滚画廊
Rate this styleA 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.
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
One document describes the colour roles, type rules, spacing and component construction behind this style. Copy or download it into Claude Code or Codex.
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.
| Name | Value | Token | Role |
|---|---|---|---|
| Ink | #1a1a1a | --color-ink | Headings and primary text — the color of a wall label. |
| Gallery White | #fcfcfa | --color-gallery-white | The page ground — a faintly warm white, like a freshly painted wall. |
| Terracotta | #a85a3a | --color-terracotta | The only accent, appearing sparingly on indices, links and selection marks. |
| Stone | #8a8a85 | --color-stone | Captions, indices and metadata — the lowest tier while staying readable. |
| Hairline | #e8e6e1 | --color-hairline | Every 1px hairline, and never thicker than 1px. |
| Dark Stone | #2e2e2c | --color-dark-stone | Inverted section grounds for about pages and the footer. |
| Role | Family | Weight | Size | Line Height | Letter Spacing | Token |
|---|---|---|---|---|---|---|
| display | Cormorant Garamond | 300 | 64px | 1.1 | 0.02em | --text-display |
| heading | Cormorant Garamond | 300 | 48px | 1.15 | — | --text-heading |
| subheading | Cormorant Garamond | 400 | 36px | 1.25 | — | --text-subheading |
| body-lg | Inter | 300 | 15px | 1.7 | — | --text-body-lg |
| body | Inter | 300 | 13px | 1.7 | — | --text-body |
| label | Inter | 400 | 12px | 1.5 | 0.2em | --text-label |
Base unit: 8px Density: airy
| Name | Value | Token |
|---|---|---|
| 8 | 8px | --spacing-8 |
| 16 | 16px | --spacing-16 |
| 24 | 24px | --spacing-24 |
| 32 | 32px | --spacing-32 |
| 48 | 48px | --spacing-48 |
| 64 | 64px | --spacing-64 |
| 96 | 96px | --spacing-96 |
| 128 | 128px | --spacing-128 |
| Element | Value |
|---|---|
| cards | 0 |
| buttons | 0 |
| media | 0 |
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.
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.
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.
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.
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.
| Level | Name | Value | Purpose |
|---|---|---|---|
| 0 | Gallery White | #fcfcfa | 展墙 |
| 1 | Dark Stone | #2e2e2c | 反色区块 |
none — a shadow would mount the work on the wallThe 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.
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.
QUICK COLOR REFERENCE:
#1a1a1a#fcfcfa#a85a3a#8a8a85#e8e6e1#2e2e2cEXAMPLE COMPONENT PROMPTS:
: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;
}
Component Templates
FAQ
/* 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
Horizontal Gallery is a layout pattern that can be paired with the following visual 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.
| Attribute | Horizontal Gallery | Dark Gallery |
|---|---|---|
| Primary color | #1A1A1A | #0A0A0A |
| Secondary color | #FCFCFA | #FFFFFF |
| Best for | horizontal gallery / horizontal scroll website / scroll snap | photography / gallery / dark |
| Unique tags | — | dark-theme |
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.