Edge Delivery Services how-tos · updated
How block options work in Edge Delivery Services
A block option is a word in brackets after the block name in the table header, such as 'Columns (wide)'. Edge Delivery Services adds it as an extra CSS class on the block. Multi-word options are joined with hyphens and comma-separated options become separate classes, so one block can have several looks without becoming several blocks.
How the header maps to classes
| Author writes in the header | Resulting markup |
|---|---|
| Columns | <div class="columns"> |
| Columns (wide) | <div class="columns wide"> |
| Columns (super wide) | <div class="columns super-wide"> |
| Columns (dark, wide) | <div class="columns dark wide"> |
These mappings are taken from aem.live's 'Markup, Sections, Blocks, and Auto Blocking' page. Your CSS then targets .columns.wide or .columns.dark, and your decorate() function can read block.classList to change behaviour.
Option or new block?
Use an option when the content model (rows and cells) is the same and only the presentation changes: a dark background, a wider layout, a different number of items per row. Create a new block when authors would need different rows or cells, because one block with many options that change its structure becomes hard to author and to test.
Keep a short list of allowed options per block in your authoring guide. Undocumented options tend to multiply, and each one is a combination you need to test for layout and Lighthouse scores.
Reading an option in decorate()
export default function decorate(block) {
if (block.classList.contains('carousel')) {
// set up slide controls only for the carousel variant
}
}How to do it
- Decide which visual differences share the same content structure.
- Write CSS for .<block>.<option> selectors.
- If behaviour changes, branch on block.classList inside decorate().
- Document the allowed options for authors, with a screenshot each.
Related pages on this site
Questions
Can an author combine several options?
Yes. Comma-separated options become separate classes, for example 'Columns (dark, wide)' gives class="columns dark wide".
What happens with a two-word option?
The words are joined with a hyphen: 'Columns (super wide)' becomes class 'super-wide'.
Do options need extra JavaScript?
No, CSS alone is often enough; use JS only if the option changes behaviour.
Sources
- aem.live: Markup, Sections, Blocks, and Auto Blocking (checked 10 Nov 2026)
Facts about Adobe's platform are from the linked Adobe pages, checked 10 Nov 2026. Explanations and examples are ours unless marked as Adobe's.