어떤 배치가 필요한지 고르기
Layout Decision Tree
Question-driven route from screen constraints to StyleGallery Layout patterns and recipes.
이 자료로 구현하기
원문 주소와 버전이 포함된 요청문입니다. 복사한 뒤 만들 화면과 요구사항을 채워 에이전트에게 전달하세요.
TRY THE PATTERN
너비가 달라지면 어떻게 될까요?
원문의 HTML·CSS로 실행합니다. 색과 테두리는 영역을 구분하기 위한 예시입니다.
FROM PRINCIPLE TO PRACTICE
이 원리로 만든 예제 4
예제를 열어 직접 조작하고, 관찰한 동작을 이 문서의 원리와 비교해 보세요.
Parallax layers서로 다른 속도
- 장면 안의 스크롤 소유자
문서 대신 이름이 있는 예제 내부 영역이 스크롤을 소유합니다. 600픽셀 트랙 안에서 220픽셀 무대가 스티키로 머물며, 휠 이벤트를 별도로 가로채지는 않습니다.
- 장면 안의 스크롤 소유자
Scroll reveal스크롤로 드러나는 장면
- 등장 효과 대신 이어지는 스냅 장면
이 예제는 세 장면을 실제 문서 순서에 두고 내부 영역에서 세로 스냅합니다. 투명도 등장이나 스티키 장면 교체는 없으며 모든 문장은 처음부터 HTML에 있습니다.
- 등장 효과 대신 이어지는 스냅 장면
Scroll crossfade스크롤로 바뀌는 사진
- 예제 안의 스크롤 소유자
문서가 아니라 이름 붙인 영역이 스크롤을 소유하고, 그 안의 트랙 위에 고정된 무대가 사진을 표시합니다.
- 예제 안의 스크롤 소유자
연결된 예제 1개 더 보기
어떤 배치가 필요한지 고르기Layout Decision Tree
- 원문 HTML과 CSS의 실제 배치
영역 너비와 글 방향을 바꿔 줄바꿈, 수축, 스크롤 주체를 확인합니다. 원문 스니펫을 그대로 실행합니다.
- 원문 HTML과 CSS의 실제 배치
Use this when the pattern name is not obvious yet.
Before Adding A Pattern
Add a new pattern only when the spatial responsibility is not already covered by an existing pattern or recipe.
- If the problem is composition, update or add a recipe.
- If the problem is visual treatment, keep it outside reusable pattern CSS.
- If the problem is repeated layout failure, document the smallest reusable pattern that prevents it.
- If scroll, sizing, or wrapping ownership is unclear, clarify ownership before writing CSS.
Examples:
- Settings page with side navigation, readable form width, and action rows: recipe composition, not one large pattern.
- Premium card treatment with shadows, color accents, and larger headings: product styling, not reusable pattern CSS.
- Repeated action row that wraps badly across screens: candidate pattern if the wrapping responsibility is not covered by
clusterorwrap-row.
Code-level distinction:
<div class="action_row">
<button type="button">Save changes</button>
<button type="button">Preview</button>
<button type="button">Discard draft</button>
</div>.action_row {
display: flex;
flex-wrap: wrap;
gap: var(--action-gap);
}This can be a reusable layout pattern only if the wrapping responsibility is not already covered by an existing pattern. Button colors, borders, shadows, and typography belong to the consuming product or demo layer.
Viewport versus container-local example:
/* Avoid for component-local layout: the parent container may be narrower than the viewport. */
@media (min-width: 48rem) {
.action_row {
flex-wrap: nowrap;
}
}/* Prefer when the component should respond to its own available space. */
.action_region {
container-type: inline-size;
}
@container (min-width: 32rem) {
.action_row {
flex-wrap: nowrap;
}
}Start With Scope
Is the layout controlled by the viewport?
Choose a viewport or shell pattern when the whole page frame matters.
- Header, footer, side navigation, or utility panels frame the page: Viewport / Shell patterns
- Only one body region should scroll: scroll-body-shell
- Side navigation should stay stable while the main region scrolls: fixed-sidenav-shell
Related recipes:
Is the layout local to a component or section?
Choose a local pattern when the component should adapt inside whatever parent owns it.
- Items stack vertically with consistent rhythm: stack
- Actions wrap in a row: cluster or wrap-row
- A region needs readable width constraints: content-limiter
Identify Content Shape
Is content repeated?
- Cards, tiles, metrics, or repeated panels: Grid / Repetition patterns
- Unknown number of columns based on available space: ram-grid
- Rows and columns should align: card-grid
Related recipe:
Is there primary and supporting content?
- Supporting content should sit beside primary content when space allows: sidebar
- List and detail regions are peers: list-detail
- Supporting content should stay visible during long reading: sticky-aside
Related recipes:
Is the layout mostly one flow?
- Prose or form content needs readable width: content-limiter
- Groups need vertical rhythm: stack
- Footer actions should stay reachable: sticky-footer
Related recipe:
Decide Scroll Ownership
Ask what scrolls before selecting fixed or sticky patterns.
- The document scrolls normally: use local composition patterns first.
- A single page body scrolls inside fixed shell regions: scroll-body-shell
- A horizontal row should scroll instead of wrapping: reel
- Sticky content follows document scroll: sticky-aside
Avoid multiple nested scroll containers unless each one has a named responsibility.
Check Media And Exceptions
- Media should preserve aspect ratio: frame
- Icons need a stable square slot: icon-frame
- Overlay should not change document order: imposter
- Regions intentionally occupy the same grid cell: overlay-stack
Rejected Alternatives
Rejected alternatives:
- Record any recipe or pattern rejected because it weakens source order, focus order, scroll ownership, constraints, or content stress behavior.
- Keep the reason in the Layout brief so the rejected option is visible during harmony evaluation and implementation handoff.


