Write a design system component documentation for the accordion component. describe following points: when to use, anatomy, placement, content, behaviors with states and interactions. Add 3 links for best practices of this component.
Assistant
Here's a design system component documentation for the accordion component:
When to use:
The accordion component is used to display a list of items with collapsible content. It's ideal for displaying a large amount of information in a compact and organized manner.
Anatomy:
The accordion consists of two main parts: the header and the content.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.
The header is the clickable or tappable part of the accordion that displays the title of the content.
The content is the area that expands or collapses when the header is clicked or tapped. It contains the information or content related to the header.
Placement:
The accordion can be placed anywhere on a page, but it's typically used in areas where space is limited, such as on a sidebar or within a container.
Content:
The content of the accordion should be concise and relevant to the header. It should provide enough information to answer the user's question or provide the necessary details.
Behaviors with states and interactions:
The accordion has several behaviors and states, including:
Expanded or collapsed state: The accordion can be in an expanded or collapsed state. When an accordion item is expanded, its content is visible. When it's collapsed, only the header is visible.
Interactions: The user can interact with the accordion by clicking or tapping on the header to expand or collapse the content.
Nesting: The accordion can be nested, meaning that the content of one accordion item can contain another accordion item.
Best practices:
Here are three links to best practices for the accordion component:
Accordion Best Practices - This link provides a list of best practices for designing and implementing accordions, including tips on accessibility, usability, and design.
Accordion Design Patterns - This link provides a collection of design patterns for accordions, including examples of how to use them in different contexts.
Accordion Design Guidelines - This link provides a set of guidelines for designing and implementing accordions, including tips on accessibility, usability, and best practices for content and design.
By following these best practices, designers and developers can create accordions that are easy to use, accessible, and provide a great user experience.