Accordion
Progressively discloses content sections, letting people expand only what they need to reduce scrolling and cognitive load on pages with secondary or optional content.
When to use
Section titled “When to use”- Use an Accordion to organize related information into clearly labeled, independently expandable sections, such as FAQs or product specifications.
- Use an Accordion to shorten a page and reduce scrolling when content is secondary or not essential for most people to read in full, such as an expandable product description.
- Use an Accordion when space is limited and long content can’t be shown all at once, such as on mobile or in a side panel.
- Use an Accordion to give people granular control over how much information they see at once, letting them focus on what matters to them.
When not to use
Section titled “When not to use”- Don’t use an Accordion when people are likely to read all the content. The extra click adds friction: use a normal page with standard headers instead.
- Don’t hide critical information or a primary action, such as an alert or confirm/cancel buttons, behind a toggle. Show it inline so people don’t miss it.
- Don’t use an Accordion for navigation. Use Tabs instead.
- Don’t use an Accordion to link to sections of the same page. Use a table of contents with anchor links instead.
- Don’t use an Accordion to organize large amounts of information with a nested hierarchy. Its flat header-and-panel structure doesn’t represent parent-child relationships well: use an indented list instead.
- Don’t nest accordions within each other to create hierarchy levels. See the nesting guidance below.
Labels
Section titled “Labels”Write clear, concise labels that describe the content they toggle. A vague label forces people to open a section just to find out what it contains.
Charging time and range
Charge from 10 to 80 percent in about 30 minutes at a fast charger.
Warranty coverage
Every new car comes with a 4-year warranty.
Delivery options
Choose home delivery or pick up at a retailer near you.
More info
Charge from 10 to 80 percent in about 30 minutes at a fast charger.
Details
Every new car comes with a 4-year warranty.
Read more
Choose home delivery or pick up at a retailer near you.
Don’t use vague labels such as More info or Details.
Icon placement
Section titled “Icon placement”Place the icon at the end of the header by default. Use the start position for wider sections, where a leading icon helps people scan down a list of headers.
Keep icon placement consistent within the same layout. Avoid using accordions without an icon.
Exterior
Choose from 12 paint colors and 3 wheel designs.
Interior
Pick upholstery, trim and ambient lighting.
Safety
See every driver assistance feature included.
Use the same icon placement for every Accordion in a layout.
Exterior
Choose from 12 paint colors and 3 wheel designs.
Interior
Pick upholstery, trim and ambient lighting.
Safety
See every driver assistance feature included.
Don’t mix icon placements in the same layout.
Exterior
Choose from 12 paint colors and 3 wheel designs.
Interior
Pick upholstery, trim and ambient lighting.
Safety
See every driver assistance feature included.
Exterior
Choose from 12 paint colors and 3 wheel designs.
Interior
Pick upholstery, trim and ambient lighting.
Safety
See every driver assistance feature included.
Don’t remove the icon from the header.
Spacing
Section titled “Spacing”Choose spacing inside the expanded content based on what it contains.
Interactive content
Section titled “Interactive content”If the content includes clickable elements such as buttons, use pb-32 after the last element. The extra space keeps tap areas generous and reduces the risk of accidental taps.
Exterior
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Charging
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Climate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Show code
import { AccordionDetails, AccordionSummary,} from '@volvo-cars/react-accordion';
const items = ['Exterior', 'Charging', 'Climate'];
export function SpacingInteractive() { return ( <> {items.map((item, index) => ( <AccordionDetails key={item} defaultOpen={index === 0}> <AccordionSummary>{item}</AccordionSummary> <div className="flex-col items-start gap-16 pb-32"> <p className="text-secondary"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget. </p> <button type="button" className="button-filled"> Learn more </button> </div> </AccordionDetails> ))} </> );}Text content
Section titled “Text content”If the content is text only, use pb-24 after the last line. The tighter spacing sets a clear visual hierarchy within the group.
Exterior
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Charging
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Climate
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget.
Show code
import { AccordionDetails, AccordionSummary,} from '@volvo-cars/react-accordion';
const items = ['Exterior', 'Charging', 'Climate'];
export function SpacingText() { return ( <> {items.map((item, index) => ( <AccordionDetails key={item} defaultOpen={index === 0}> <AccordionSummary>{item}</AccordionSummary> <p className="pb-24 text-secondary"> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse malesuada lacus ex, sit amet blandit leo lobortis eget. </p> </AccordionDetails> ))} </> );}Nesting
Section titled “Nesting”Don’t nest accordions within each other to create hierarchy levels. Nesting adds cognitive load and inconsistent interaction targets. Flatten the structure, or use an indented list instead.
Paint colors
Choose from 12 paint colors.
Wheel designs
Pick from 3 wheel designs.
Lighting
Compare the available headlight options.
Exterior
Paint colors
Choose from 12 paint colors.
Wheel designs
Pick from 3 wheel designs.
Don’t nest accordions within each other.
Exclusive vs. standard behavior
Section titled “Exclusive vs. standard behavior”By default, an Accordion lets people expand and collapse every item independently, with more than one open at a time. This is the recommended behavior.
Use exclusive mode, where opening one item closes the others, only when vertical space is limited and multiple open sections would push key content out of view. See the Exclusive Accordion example.