What belongs in an accordion
Use accordions for details that help some readers but are safe for everyone else to skip.- A fix for a specific error message
- Customizing settings that don’t affect the standard setup
- Diagnostic information for investigating an unexpected result
- Background that explains why a step works without changing what the reader should do
Example of an accordion for a troubleshooting step
Fix a connection timeout
Fix a connection timeout
Confirm that your firewall allows outbound traffic on port 443, then retry the request.
Keep required steps visible
Prerequisites, required actions, warnings, and expected results should always be visible. Do not hide them within an accordion. Suppose every reader must do a task, like restart the development server after changing an environment variable. Hiding that instruction makes the procedure look shorter, but it also makes it harder to complete since someone may not click into the accordion and see the required task.Example of a required action inside an accordion - don't do this
1
Add the environment variable
Add
API_KEY to your .env file.Additional details
Additional details
Restart your development server to load the new value.
Example of a better use of an accordion
1
Add the environment variable
- Add
API_KEYto your.envfile. - Restart your development server.
The new value isn't loading
The new value isn't loading
Confirm that the file is named
.env and is in the project root.Group independent details
Use<AccordionGroup> when several related items can be read independently.
The CLI command isn't available
The CLI command isn't available
Restart your terminal or run the command with
npx mint.Port 3000 is already in use
Port 3000 is already in use
Run
mint dev --port 3333 to choose another port.Choose the component by what readers need
Several components hide or emphasize content, but they solve different problems.- Optional detail → accordion
- A version for the reader’s operating system, framework, or other context → tabs
- Nested fields in API reference content → expandable
- Information readers must notice → callout or main content
Give readers a reason to open accordions
Accordion titles must describe what is inside. “More,” “Details,” and “Learn more” force readers to guess. “Fix a 401 response” and “Configure a proxy” make the choice clear.Next up: Code block essentials — Make examples easier to understand and use.