Patterns
Practical composition patterns for unitone-css.
Use this page as a reference when a layout can be solved by combining multiple primitives, and when you want to avoid unnecessary custom CSS, ad-hoc utility classes, or direct overrides on primitives.
For screenshot-to-code work, do not start by copying the nearest-looking example blindly. First identify the structural pattern, then choose the closest section below.
How To Read This Page
Use this order before jumping into a specific example:
- Decide the dominant relationship: stack, split, grid, layer, or float
- Decide which primitive should own width:
usually
Container,Center,Cover,Layers, orText - Decide which primitive should own section spacing:
usually
Guttersfor the basic section padding - Decide whether overlap is real:
if yes, inspect
Layerspatterns before spacing-based alternatives - Decide the repeated unit: rows, cards, chips, buttons, media tiles, or prose blocks
In most sectioned pages:
Containerowns widthGuttersowns the basic section inset and block paddingStackowns explicit relationships between items inside a section
Do not add a page-level Stack only to recreate the default spacing between sections when each section already has Gutters.
Quick Pattern Map
Use these mappings as a fast index into this page.
| Visual pattern | Start here | Compare with |
|---|---|---|
| Centered hero | Page Hero | Layered Hero |
| Hero with actions | Hero With Action Buttons | Centered CTA Section |
| News or announcement rows | Announcement List | Sidebar Layout |
| Repeated cards | Card Grid | Feature List |
| Header with left and right actions | Header Bar | Button Group |
| Large two-column split that collapses to one column | Split Media And Text | Sidebar Layout |
| Cards with aligned media ratios | Card Grid With Uniform Media | Card Grid |
| Title and supporting text in a centered section | Centered Title Section | Text Content Block |
| Title plus actions in a centered section | Centered CTA Section | Hero With Action Buttons |
| Article intro | Article Header | Text Content Block |
| Long-form readable content | Text Content Block | Article Header |
| Form label + field row | Form Row | Sidebar Layout |
| Horizontal action set | Button Group | Badge / Label Cluster |
| Wrapping badges or tags | Badge / Label Cluster | Button Group |
| Horizontally scrollable items without wrapping | Horizontal Reel | Badge / Label Cluster |
| Decorated surface around another primitive | Decorated Surface Block | Centered CTA Section |
| Decorative background behind content | Section With Decorative Background | Layered Hero |
| Real overlap with background media | Layered Hero | Section With Decorative Background |
Selection Notes
BothSides vs WithSidebar
Use BothSides when both sides are peers.
Use WithSidebar when one side is clearly secondary, such as metadata, labels, or supporting media.
Cover vs Layers
Use Cover when the structure is mainly vertical distribution.
Use Layers when overlap itself is part of the composition.
ResponsiveGrid vs Switcher
Use ResponsiveGrid when repeated cards are the main pattern.
Use Switcher when a small set of larger items primarily needs split-to-stack behavior.
Text as width owner
Text is not a neutral wrapper.
Use it when readable measure is intended, not by default for heroes or wide panels.
Gutters vs page-level Stack
Use Gutters as the default owner of a section’s basic padding.
Use a page-level Stack only when the relationship between whole sections needs to be expressed explicitly, not as a substitute for ordinary section spacing.
Page Hero
A first-view section with a large headline, supporting text, and enough surrounding space to establish visual hierarchy.
Clouds floated across the sky.
Moonlight drifted through the clouds and softened the quiet trees.
Hero With Action Buttons
A hero block that places one or more call-to-action buttons below the main copy while keeping the text flow readable on small screens.
Clouds floated across the sky.
Moonlight drifted through the clouds and softened the quiet trees.
Announcement List
A section with a heading and a vertical list of updates, where each item usually contains metadata such as a date and a short release note or title.
News
Header Bar
A compact top bar that places two elements at opposite ends, such as a logo on the left and a menu button on the right.
Use this pattern when the main requirement is to keep two items pulled apart with a clear start and end relationship, rather than building a sidebar-like split.
Logo
Split Media And Text
A large two-column composition where media and text sit side by side with similar visual weight, then collapse to a single column on smaller screens.
Use this pattern when both sides should feel like major sections of the layout, such as an image on one side and explanatory copy on the other.
Sand and Stars
Stars fell over the silent desert. The wind lifted grains of sand, making them shimmer like tiny lights. The moon cast its glow, stretching far into the distance.
In the quiet night, only the sand and stars remained, patiently marking time.
Card Grid
A collection of repeated cards that wrap into responsive columns without relying on media-query-specific breakpoint layouts.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Card Grid With Uniform Media
A repeated card grid where each card includes an image or video that should maintain a consistent aspect ratio across the set.
Use this pattern when media alignment is part of the visual rhythm, such as article cards, product cards, or gallery-like listings.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Feature List
A vertical or grid-based list of short feature descriptions, often combining a small heading, supporting text, and optional icon-like decoration.
Lorem ipsum dolor sit
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Lorem ipsum dolor sit
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Sidebar Layout
A layout where a narrow side column and a wider main column sit next to each other, while still collapsing naturally to one column when space is limited.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
Centered Title Section
A centrally positioned title and a content area the width of a container. A simple section.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
Centered CTA Section
A centered call-to-action area that emphasizes a short message and one or more actions inside a constrained content width.
Lorem ipsum dolor sit amet
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Article Header
A top section for an article or post that combines title, metadata, summary, and sometimes category or author information in a readable hierarchy.
Lorem ipsum dolor sit amet
Short summary line
Text Content Block
A readable body-content section for headings, paragraphs, lists, and other long-form text elements with consistent spacing between them.
Lorem ipsum dolor sit amet
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cill
Form Row
A row that aligns a label, input, helper text, or action in a way that remains usable when the layout narrows.
Button Group
A horizontal set of related actions that can wrap cleanly and keep consistent spacing and alignment as the available width changes.
Badge / Label Cluster
A small group of badges, tags, or labels that should line up horizontally, wrap naturally, and remain visually balanced.
Horizontal Reel
A row of items that should stay on one line and remain accessible by horizontal scrolling instead of wrapping.
Use this pattern when content would otherwise be clipped or awkwardly wrapped, such as logo rails, compact card sliders, chip lists, or narrow-screen control rows.
Use this pattern for larger card-like items too, not only simple images.
INTERVIEW
Lorem ipsum dolor sit amet
INTERVIEW
Consectetur adipisicing elit
INTERVIEW
Sed do eiusmod tempor
INTERVIEW
Lorem ipsum dolor sit amet
INTERVIEW
Consectetur adipisicing elit
INTERVIEW
Sed do eiusmod tempor
Decorated Surface Block
A block where one primitive handles structure and Decorator provides the visual surface, such as padding, background, border radius, border, or shadow.
Use this pattern when you want to style a section, card, callout, or panel without weakening the meaning of the underlying primitive composition.
Lorem ipsum dolor sit amet
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Dialog Content Layout
An internal dialog structure that separates heading, body, and actions so modal content remains readable and easy to scan.
Popover Content Layout
A compact floating panel layout for short navigation, metadata, or actions where spacing and grouping matter more than large-scale composition.
The content of the Popover.
Section With Decorative Background
A content section where the main structure is built with primitives, while decorative background treatment is layered behind or around the content.
Lorem ipsum dolor sit amet
Consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Layered Hero
A hero layout that combines foreground content and background visual elements in overlapping layers, while keeping the readable content structure separate.
Clouds floated across the sky.
Moonlight drifted through the clouds and softened the quiet trees.
Text overwrap Hero
A hero with text and an image overlapping, slightly misaligned. The elements are layered using layer primitives, and then offset using the gridColumn (--unitone--grid-column) / gridRow (--unitone--grid-row) properties of the child elements.