Article Title
Article excerpt...
Read moreCreate beautiful masonry-style layouts in minutes
<head>)
</body>)
Card 1
Card 2
Card 3
Perfect for photos with varying heights
Display article cards with varying content lengths
Article Title
Article excerpt...
Read more
Display products with different descriptions and features
Product Name
Description...
Balance dashboard cards with different data visualizations
| Attribute | Purpose | Values |
|---|---|---|
data-layout |
Activates balanced mode | "balanced" |
data-slots-xs / data-cols-xs |
Columns for extra-small screens | Number (e.g., "1") |
data-slots-sm / data-cols-sm |
Columns for small screens | Number (e.g., "2") |
data-slots-md / data-cols-md |
Columns for medium screens | Number (e.g., "2" or "3") |
data-slots-lg, -xl, -xxl (and data-cols-*) |
Columns for large+ breakpoints; inherit from the last defined value if omitted | Number |
| Breakpoint | Width Range | Attributes Used |
|---|---|---|
| XS | < 576px | data-slots-xs / data-cols-xs (default 1) |
| SM | ≥ 576px and < 768px | data-slots-sm / data-cols-sm, falling back to XS if not set |
| MD | ≥ 768px and < 992px | data-slots-md / data-cols-md, falling back to SM → XS |
| LG | ≥ 992px and < 1200px | data-slots-lg / data-cols-lg, falling back to MD → SM → XS |
| XL | ≥ 1200px and < 1600px | data-slots-xl / data-cols-xl, falling back to LG → … → XS |
| XXL | ≥ 1600px | data-slots-xxl / data-cols-xxl, falling back to XL → … → XS |
data-slots-* and/or data-cols-* based on container width.rsl-smart-column wrapper divs.slot-item into the currently shortest columndata-layout="balanced" are affected. All other .responsive-slot-layout containers continue using the standard CSS Grid layout.
data-slots-lg="3" for most desktop content—it balances well without making cards too narrow.
data-slots-lg="4" or higher for a strong masonry effect.
data-slots-xs="1" (or data-cols-xs="1") for mobile to ensure readability.
data-layout="balanced" is present on the container.sections.css is loaded.smart-sections-balanced.js is loaded.data-slots-xs, data-slots-sm, data-slots-md, etc. or the data-cols-* equivalents).layout.js is loaded before smart-sections-balanced.js in your project.Open balanced-layout.html in your browser
Use playground.html as a template
Explore other RSL components and patterns