Skip to main content
Two ways to create a collapsible section in Confluence
Share on socials

Two ways to create a collapsible section in Confluence Cloud

A headshot of Zoriana Bogutska
Zoriana Bogutska
13th February, 2024
Two different collapsible sections with some sections hidden and some expanded
A headshot of Zoriana Bogutska
Zoriana Bogutska
13th February, 2024
jump to section
What are collapsible sections?
Why use a Confluence collapsible section?
Method 1: Built-in Expand macro
Method 2: Advanced Expand macro
When not to use a collapsible section in Confluence

Give users the information they need - without clogging up their brains. Here’s how to do just that with Confluence collapsible sections.

You’ve got plenty of useful content, but there’s so much information that it’s overwhelming! How can you engage users without compromising on delivering your message?

There are two different ways to create collapsible sections, depending on your needs. Read on to learn about Confluence’s built-in, no-frills tool, and how the Advanced Expand macro (from Content Formatting Macros for Confluence) will help you create better pages in no time..

What are collapsible sections?


Collapsible sections are interactive elements that users can click on to reveal - or hide - information. They’re a great way of saving space on a Confluence page.
A GIF of a user expanding and collapsing an Expand macro in Confluence

Why use a Confluence collapsible section?


  • It helps keep pages shorter, giving users a more seamless experience when trying to locate the section they want to refer to.

  • A less visually overwhelming page makes the information more accessible to users, meaning they’re more likely to stay on your web page rather than going elsewhere.

  • Collapsible sections are a great solution for pages that contain a lot of information but still need to be mobile-friendly.

How to create a collapsible section in Confluence

There are two different ways to create a collapsible section, depending on your requirements. Read on to discover which is right for you:


Method 1: Confluence’s built-in Expand macro

Best for: Quick, simple collapsible sections with limited content

To create your Confluence collapsible section, you’ll be using the Expand macro. This is a built-in macro that you can use without any extra add-ons.

1. On your page, type the shortcut /expand to bring up the Expand macro. Click on the macro to launch it.
The /expand shortcut used within a Confluence page
2. Click where the text reads “Give this expand a title…” to start typing in the title for your collapsible section. Then click the section below to type or paste in the main content of your collapsible section.
An expanded collapsible section in Confluence containing heading and body text
3. Click "Publish" or "Update" in the upper right corner of your page to save your changes and publish your shiny new collapsible section.

⚡️ Pro Tip: You can duplicate your collapsible section to easily recreate a similar section below by clicking the Copy icon (it looks like two overlapping pages).
A GIF of a Confluence Expand macro with text and heading being collapsed and expanded

Benefits:

  • It’s quick and easy to use, meaning you can start organising your pages straight away.
  • Because it’s a free, built-in feature, you don’t need to worry about getting admin permission to install it.

Drawbacks:

  • You can’t nest content or other macros inside it, and you can’t use them in other macros either, limiting what you can actually do with it.
  • The Expand feature is easy to miss on a page, which means users could end up skipping over important information.

Looking for a more robust alternative to Confluence’s out-of-the-box tool? Read on…

Method 2: Advanced Expand macro (from Content Formatting Macros)

Best for: Turning complex Confluence content into cleaner pages, using collapsible sections with other macros

While Confluence’s built-in collapsible section is limited in scope, Content Formatting Macros’ Advanced Expand macro is designed to help you organise your page however you want.
A GIF showing a user clicking to open and close the Advanced Expand macro
The Expand macro’s improved functionality means you can now include tables and information. With its bolder header and outline, it’s also harder to ignore too. This means fewer users skipping over your pages and missing important information.

Features:

  • Nest the Advanced Expand inside other macros, including Confluence tables and other macros included in Content Formatting Macros.
  • Use other built-in Confluence Macros within the collapsible section to make content more engaging and add more structure.
  • The title of the Advanced Expand is more noticeable than Confluence’s built-in Expand tool, and is less likely to get missed on the page.
A table of different tasks using the Advanced Expand macros to represent each task - two of them are open to show extra information while the rest are collapsed
Get hands-on with the Advanced Expand macro and more!

How to use Advanced Expand:


Keen to learn how to use the Advanced Expand macro on your Confluence pages? Here’s how to do it:
2. On your page, click the pencil icon to start editing. Then start typing /advanced expand on the page and click on the Advanced Expand macro.
A dropdown showing the Advanced Expand macro on a Confluence page
3. In the Advanced Expand editor dialog, type in a title and add your content to the box. You can even add Confluence’s built-in macros using the / shortcut, as shown below:
A GIF of a user adding an Info Panel to the Advanced Expand editor in Confluence
4. Press “Save”, then Click “Publish” or “Update” in the top-right corner of your page to see your new Expand macro in action.

⚡️ Pro tip:
If you want to embed your macro inside another macro, create that macro first by typing its shortcut on the page (e.g. “/tabs”), then follow the steps to set it up. You can then either cut and paste an existing Advanced Expand macro into the new macro holder, or type “/advanced expand” directly inside it.

When not to use a collapsible section in Confluence


Though collapsible sections are very helpful in creating a more streamlined web page, they might not always be the best option.

If you have a very long web page even with collapsible sections, there’s a risk that users will become fatigued or miss important pieces of information. Moreover, users have to manually collapse sections, adding an extra step to their reading experience.

Fortunately, Content Formatting Macros has a fantastic alternative in Tabs. Spread information over several tabs as you would within a browser, keeping your page shorter and making it easier for users to locate the sections they want to interact with. Sound good? See our guide to creating Confluence tabs.
A GIF showing a user clicking through different tabs within a Confluence page
Now you should have the tools you need to provide a better, more customisable reading experience for the users who most need the content you have to offer - it’s a win-win!

Unlock new ways to improve your user experience

Content Formatting Macros for Confluence Cloud comes with Advanced Expand, Tabs, and many more macros to make pages easier to read and navigate.
Written by
A headshot of Zoriana Bogutska
Zoriana Bogutska
Senior Product Marketing Manager
Zoriana has over 12 years of experience in marketing, with 6 of them in product marketing management. As a Senior Product Marketing Manager, Zoriana aims to ensure Kolekti's apps excel by understanding customer needs, solving their problems, and making Kolekti truly the best solution.

LinkedIn →
Confluence
Content Formatting