Accordions

Accordions organize and display content in a structured manner, allowing users to quickly scan headings and expand sections for additional details.

Standard scope

This standard applies to:

  • pennmedicine.org
  • All Penn Medicine websites
  • Penn Medicine mobile applications
  • All Penn Medicine digital products

Overview

Accordions and accordion sets are typically used to:

  • Provide information: Share summary content with the ability to get more details.
  • Reduce scrolling: Collapse long content to improve page scannability.
  • Organize information: Group related content into categories.

Use cases

The accordion is a self-contained component, or molecule. The accordion set is a container with one or more accordions and is referred to in the design system as an organism or AccordionSet.

The accordion component has several variations for specific use cases.

  • Accordion components are always part of an accordion set.
  • Accordion sets always have at least one accordion.
  • In most cases, accordions in an accordion set are homogenous, with a few exceptions.
Accordion set type
Design System name
When to use
Grid layout
Small accordion set
AccordionSet-Small
Users use headings to determine which accordion to reveal or hide.  
12-col: 1 accordion/row

8-col: 1 accordion/row, centered
Large accordion set
AccordionSet-Large
Users view numerical indicators to understand how many options of a given category of information are available if they expand the accordion.
12-col: 1 accordion/row

8-col: 1 accordion/row, centered
Location accordion set
AccordionSet-Location
Users view the name and address of a location to determine which accordion to reveal or hide.
12-col: 1 accordion/row

8-col: 1 accordion/row, centered

Small accordion set

The small accordion component always has the following elements:

  • Title – Also serves as the heading for the accordion component when expanded.
  • Iconography – A chevron icon indicating expand/collapse functionality.
  • Expandable Panel – A variety of content that displays when users expand the accordion.
  • Image
  • Body copy
  • Cards
  • CTA link

The small accordion set contains one or more accordions and may include an optional independent title, description and link to additional details.

Large accordion set

The large accordion component consists of:

  • Numerical Indicator – Displays a count (e.g., number of items within the accordion set).
  • Title – Defines or categorizes the information displayed when the accordion is expanded.
  • Chevron Icon – Indicates expand/collapse functionality.
  • Expandable Panel – Content that displays when users expand the accordion.
  • Informative text - Unlinked text relevant to the category title for the accordion.
  • CTA links – Specifies links to pages that are related to the category title for the accordion.
  • Note that accordion elements may be holistic or a combination of informative text and CTA links.
  • Optional unique accordion set CTA link - For the user to view more options related to this accordion category.

The large accordion set contains one or more accordions and may include an optional independent title, description and link to additional details.

Location accordion set

The location accordion component consists of the following elements:

  • Title – Location name
  • Address - Address of location
  • Chevron Icon – Indicates expand/collapse functionality.
  • Expandable Panel – Each panel represents a location that users can expand to reveal additional details.
  • Location Details – Includes the facility name, address, and external link to location details.
  • Contact Information – Displays the phone number as a clickable element for direct dialing.
  • Service Tags – Indicates available amenities such as WiFi, pharmacy, or virtual care.
  • CTA Button – Provides a “View location” button leading to more details.
  • Image or Map Preview – Displays either an image of the facility or an interactive map.

The location accordion set contains one or more accordions and may include an optional independent title, description, optional subheadings to break up groupings of accordions and a link to additional details.

Behavior

Interaction

  • Clicking on a collapsed panel expands the content and rotates the chevron icon upward.
  • Clicking on an expanded panel collapses the content and rotates the chevron icon downward.
  • Only one accordion panel can be expanded at a time in certain implementations.

States

  • Expanded: Content is fully visible, and the chevron icon points up.
  • Collapsed: Content is hidden, and the chevron icon points down.

Customizable  elements

This component offers a flexible structure, allowing for customization of content. The layout supports a variety of elements that can be toggled on or off to create a tailored experience. Below are the key components of the design.

Small Accordion

Element
Required/Optional
Guidelines
Specs
Panel title
Required
Acts as the heading for the accordion. Keep concise and descriptive.
Recommend max 1 line
Panel icon
Required
Use a chevron indicator to signal expand/collapse functionality.
Always aligned to the right of the title.
Expanded panel image
Optional
Use high-quality, relevant images.
Aspect ratio 16:9
Expanded panel content text
Required
Use to provide additional information
No limit; Avoid excessive content.
Expanded panel tags
Optional
Use to highlight services or options related to this content
12 col: 2 tags/row
Recommended 3 row max
Expanded panel vertical cards
Optional
Use to feature other information related to this content
12 col: 3 cards/row
Expanded panel CTA link
Optional
Recommend max 1 line
Accordion set title
Optional
Serves as a section heading for the . accordion set. Keep concise and scannable. Use sentence case and avoid unnecessary punctuation.
Recommend max 1 line
Accordion set body
Optional
Provides a brief description or context for the accordion set. Use short, scannable text to introduce the card grouping.
Recommended max 4 lines
Accordion set link
Optional
Allows an accordion set to have a unified CTA leading to more details with the link text providing context.
Recommended max 1 line

Large Accordion

Element
Required/Optional
Guidelines
Specs
Panel numerical Indicator
Required
Displays a number representing the number of categorized items within the panel.
Always aligned to the far left.
Panel title
Required
Each panel should be clearly labeled with scannable text.
Recommend max 1 line.
Panel icon
Required
Use a chevron indicator to signal expand/collapse functionality.
Always aligned to the right of the title
Expanded panel body
Required
Can be a combination of text with no link and link text.
Up to 12 text or link text elements listed in 3 columns and 4 rows.
Expanded panel link text and plus sign
Optional
Used when there are more than 12 options to view.
Recommend max 1 line
Accordion set title
Required
Keep concise and descriptive. Serves as the section heading for the accordion set. Use sentence case and avoid unnecessary punctuation.
Recommend max 1 line
Accordion set body  
Optional
Provides context or a brief introduction for the accordion set.
Recommend max 4 lines
Accordion set link
Optional
Allows an accordion set to have a unified CTA leading to more details with the link text providing context.
Recommend max 1 line

Location Accordion

Element
Required/Optional
Guidelines
Specs
Panel location details
Required
Must include name, address, and external link going to map of address
Recommend max 2 lines
Panel icon
Required
Use a chevron indicator to signal expand/collapse functionality.
Always aligned to the right of the title.
Expanded panel contact information
Required
Displays the phone number, which should be clickable for direct calls.
[Area Code]-[XXX-XXXX]
Expanded panel service tags
Optional
Displays relevant facility amenities (e.g., WiFi, pharmacy, virtual care). Icon for amenity is optional.
Recommended max 12 characters; Max of 4 service tags.
Expanded panel CTA button
Required for interactive cards
Uses action-oriented text such as “View location.”
Recommended max 14 characters.
Expanded panel image or map preview
Optional
Displays an image of the facility or an interactive map.
Aspect ratio 16:9
Accordion set title
Required
Keep concise and descriptive. Serves as the section heading. Use sentence case and avoid unnecessary punctuation.
Recommend max 1 line
Accordion set body
Optional
Provides context or a brief introduction for the accordion set
Recommend max 4 lines
Accordion set subheading(s)
Optional
Allows for the opportunity to segment groups of accordions within the accordion set.
Recommend max 1 line
Accordion set link
Optional

Allows the accordion set to have a unified CTA leading to more details with the link text providing context.
Recommend max 1 line

Guidelines (do’s and don’ts)

Do
  • Use clear and concise headings for each accordion item.
  • Maintain a consistent unexpanded layout when using multiple accordions in a set. The expanded accordions may or may not have consistent content.
  • Use numerical indicators when relevant to highlight groupings.
  • Ensure chevron icons clearly indicate interactivity.
Don't
  • Overuse accordion elements, especially for short content that does not require collapsing.
  • Display all accordion panels expanded by default, as it defeats the purpose of the component.
  • Remove numerical indicators if they add valuable context to the content.

Related resources

For designers: Visit the Designers section for access to component specs and Figma files.

For developers: Visit the Developers section for implementation details and to access the front-end code library in Storybook.

Contact

For more information about this standard, email: web-standards@pennmedicine.upenn.edu

Last updated

Date
Version
Description
05/01/2025
1.0.0
Initial Release