Accordion

An accordion is a component that can be expanded or collapsed to show or hide content as needed.

Anatomy

1. Header

Serves as the clickable area that allows users to toggle the accordion state. It contains a descriptive title that conveys the gist of the information within the accordion, and may also include additional elements like icons or action items to provide context or enhance functionality.

2. Title

The primary text for the accordion, providing a concise summary of the section’s content. May also add a subtitle if additional information is needed.

3. Toggle icon

Visual indicator that reflects the current state of the accordion. In some cases, may act as a clickable element instead of the whole header for users to toggle the accordion state.

4. Content section

Collapsible area that displays secondary content when expanded, and hidden when closed

Type

1. Types by position

Accordions use a toggle icon to indicate whether a section is expanded or collapsed. In many implementations, this icon also serves as the clickable trigger for toggling the section open or closed. The position of the toggle icon can vary depending on the layout and interaction needs.

Left-aligned toggle are typically used when the right side of the accordion header contains other interactive elements like action buttons. Placing the icon on the left avoids visual and functional conflict, helping users clearly distinguish between navigation and actions. In this arrangement, a right-pointing arrow usually represents the collapsed state, while a downward-pointing arrow indicates that the section is expanded. 

Right-aligned toggle are more suitable when the header contains only text, with no additional actions. This layout offers a cleaner, more balanced appearance. In such cases, a downward-pointing arrow often indicates a collapsed section, and an upward-pointing arrow signals that the section is expanded.

The choice between left or right alignment should be guided by the content structure and the presence of other interactive elements, ensuring a seamless and intuitive user experience.

2. Types by function

Basic accordion is suitable for simple use cases where users primarily need to view information without the need for additional actions or interactions. It features a header containing only a title and a toggle icon, with the entire header serving as the interactive area to toggle the accordion. It may also include additional contextual information in its header, like metadata, status indicator, etc. 

Interactive accordion is designed for use cases that require quick access to secondary actions. Its header includes additional action items alongside the title and toggle icon. For this type, the toggle icon serves as the only interactive area to expand or collapse the accordion, to prevent accidental toggling when interacting with action items. Clear visual cues and hover states are provided to differentiate between actionable elements and the toggle area.

3. Types by style

There are 4 different UI styles: separated, grouped, split, borderless

The chevron icon—specifically the up and down chevron—is the default icon set for the Coral accordion component and is also the most commonly used option. However, several other icon choices are available and can be used as shown below.

States

Accordion has 5 states: collapsed, expanded, hover, focused, disabled

Size

The Coral system provides two accordion size options: standard and loose. These density options differ in vertical and horizontal padding, as well as the title font size. The width of the accordion should fill the width of the area it is used in.

Edge cases

1. Long title

Accordion titles should be kept concise and easy to scan. They may extend up to two lines. If it exceeds two lines, truncate the remaining with and ellipsis.  For truncated headers, display the full text on hover in a tooltip.

2. Empty content

When an accordion is expandable but contains no content, display a structured empty state message within the expanded area. 

Avoid disabling accordions entirely, as this creates confusion on why it appears non-functional. Reserve disabled states only for specific scenarios such as multi-step workflows where subsequent accordions depend on completing earlier steps, or when users lack permission to access certain content sections.

Specs
Basic accordion - Collapsed
Interactive accordion - Collapsed
Basic accordion - Expanded
Loose accordion - Expanded
Contributor
Kenneth Chan
updated on 07 Oct 2025
    Coral is a thoroughly developed design system widely adopted by developers and designers for creating beautiful and user-friendly Sea internal products.

    Copyright © 2018-2025 Sea Labs