Skip to main content
Coat of arms of Barbados
Official government website

Show/Hide

Reveal secondary content, such as help text, on demand.

Preview

Show/Hide

The Show/Hide component is a disclosure that reveals secondary content when a user chooses to see it. It is useful for help text and other detail that not every user needs to read.

When to use this component

Use show/hide for supporting information that the average user can skip, such as help text, worked examples, or extra detail that only some users need.

When not to use this component

Do not hide content that users need in order to complete the task. If most users need the information, show it on the page rather than hiding it behind a disclosure.

Writing the summary

Write the summary as a descriptive noun phrase, such as "What is a parish?", rather than a vague label like "More info". The summary is built on the native <details> element, so keyboard and screen reader behaviour work without any extra scripting.

Open by default

A disclosure can start open if the content inside it is useful to most users but still optional to read. Use this sparingly: most disclosures should start closed.

Open by default