Columns
Give your content room. Responsive layouts that follow your lead.
<div class="columns">
<div>
<div><span class="badge accent">The simple approach</span><h2>Content comes first.</h2><p>Write meaningful HTML. Let small, focused blocks take care of the rest.</p></div>
<div><h3>A little structure. A lot of freedom.</h3><p>Flexible columns adapt to your content and collapse naturally on smaller screens. No utility classes required.</p><a class="button-secondary" href="#get-started">Get started</a></div>
</div>
</div>.columns > div { display: grid; grid-template-columns: repeat(var(--columns, 2), minmax(0, 1fr)); gap: 2rem; align-items: center; }
.columns img { border-radius: var(--radius); }
@media (width < 768px) { .columns > div { grid-template-columns: 1fr; } }export default function decorate(block) {
block.style.setProperty('--columns', Math.min(block.firstElementChild?.children.length || 1, 4));
}Installation
Run the source CLI from a Blocks UI checkout. This package is not published to npm.
node packages/cli/index.js add columnsOr copy the source files above. Include tokens.css and base.css once in your project.
Usage
Use the authored row-and-column structure, then let the standalone runtime discover and enhance the block.
<div class="columns">
<div>
<div><span class="badge accent">The simple approach</span><h2>Content comes first.</h2><p>Write meaningful HTML. Let small, focused blocks take care of the rest.</p></div>
<div><h3>A little structure. A lot of freedom.</h3><p>Flexible columns adapt to your content and collapse naturally on smaller screens. No utility classes required.</p><a class="button-secondary" href="#get-started">Get started</a></div>
</div>
</div>import decorate from './blocks/columns/columns.js';
document.querySelectorAll('.columns').forEach(decorate);Variants
Choose a variant in the live preview. Add its class to the authored block.
defaultAccessibility & behavior
Semantic HTML, visible focus states, shared contrast-aware tokens, and responsive styles provide an accessible foundation. Preserve labels and heading hierarchy when customizing.
Multiple instances are supported. Layouts adapt to smaller viewports. No npm dependencies are required at runtime.
AEM usage
Copy the canonical CSS and JavaScript into your EDS block folder. Use the same row-and-column authoring structure shown above and let your existing AEM loader call the default decorator.
Standalone verified. EDS markup compatible. Live AEM integration has not been verified.