Expand Macro
Add the Expand macro to your page to provide content in an expandable / collapsible section.
This is one of Confluence's most popular macros. It's great for:
- visually reducing the amount of information on a page
- breaking process information down into clickable steps
- hiding background or obsolete information, while still keeping it on the page for future reference.
The macro is collapsed by default, people need to click each one to expand it. There's no way to expand all macros on a page at once, however all Expand macros are automatically expanded when you print or export the page to PDF.
On this page:
Screenshot: page showing four expand macros. Two are collapsed, and two are expanded.
Add this macro to your page
To add the Expand macro to a page:
- Unable to render {include} The included page could not be found.
- Choose Expand from the Formatting category.
- Enter a Title. This is the text a user will click on to show the hidden content.
- Type or paste your text into the body of the macro. This content will be visible when someone clicks the macro title.
- Choose Insert.
You can then publish your page to see the macro in action.
Screenshot: The expand macro in the editor
Change the macro parameters
Here's a list of the parameters available in this macro.
Parameter | Default | Description |
---|---|---|
Title | Click here to expand... | Defines the text that appears next to the expand/collapse icon. |
Other ways to add this macro
Add this macro as you type
Add this macro using wiki markup
Macro name: expand
Macro body: Accepts rich text.
{expand}
This text is _hidden_ until you expand it.
{expand}
Notes
- Text is expanded in PDF and HTML exports. When you export the page to PDF or HTML, the text between the macro tags is expanded so that readers can see it in the PDF and HTML versions of the page.
- Nesting your Expand macros. You can put one Expand macro inside another, and Confluence will correctly show and hide the contents of all Expand macros, including the nested ones.
- Using the Confluence Cloud editor? This macro may not be available in the new editor. See Expand macro for more information.
Do more with Confluence
Extend Confluence with one of the hundreds of other macros in the Atlassian Marketplace, such as:
- Composition Tabs & Page Layouts: Toggle or expand the visible of portions of your pages with the Toggle and Cloak macro
- Content Formatting for Confluence: Over 30 easy-to-use Confluence macros gives you the ability to create better, more engaging content