> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/accordion/organize-product-details-with-accordion.md).

# Organize Product Details with Accordion

Build an Accordion that groups product descriptions, specifications and shipping information, then test which sections open in Builder Preview.

Give users a quick way to browse a product description, specifications and shipping information. Build an Avonni Dynamic Components Accordion that shows the description first and keeps the other details one click away.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FIlH7BmCydZJWU2UQ8hwC%2Faccordion-product-details-result.jpg?alt=media" alt="Product details accordion with Description open and two other sections collapsed" width="468"><figcaption><p>Builder Preview opens Description first and keeps the other product details collapsed.</p></figcaption></figure>

[View this capture at full size](https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FIlH7BmCydZJWU2UQ8hwC%2Faccordion-product-details-result.jpg?alt=media)

## Before you start

* Open a Dynamic Component you can edit in Avonni Component Builder.
* Use the sample product text below for the exercise. The text is entered directly in the Text components.

## Steps

{% stepper %}
{% step %}

### Create three sections

1. Drag **Accordion** onto the canvas and select it.
2. Under **Properties**, click **Add Items**.
3. Enter the **Label** and **Value** for the first section, then click **Save** in the dialog. Repeat for each section below.

| Label                | Value            |
| -------------------- | ---------------- |
| Description          | `description`    |
| Specifications       | `specifications` |
| Shipping and returns | `shipping`       |
| {% endstep %}        |                  |

{% step %}

### Add the product details

Drag a **Text** component into each section and enter the corresponding sample text.

* **Description.** A compact desk lamp with adjustable colour temperature and a weighted base.
* **Specifications.** Height 42 cm. Weight 1.8 kg. 2700K to 5000K. USB-C powered.
* **Shipping and returns.** Ships in two business days. Free returns within 30 days.
  {% endstep %}

{% step %}

### Set the starting section

Select the Accordion and choose **Description** in **Active Section(s)**. Leave **Allow Expansion of Multiple Sections** off so users see one set of details at a time.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FxiR16OW690dbAZHZNb7D%2Faccordion-product-details-settings.jpg?alt=media" alt="Edit Accordion properties with multiple expansion off and Description selected in Active Section(s)" width="320"><figcaption><p>Select Description as the starting section and leave multiple expansion off.</p></figcaption></figure>

[View this capture at full size](https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FxiR16OW690dbAZHZNb7D%2Faccordion-product-details-settings.jpg?alt=media)
{% endstep %}

{% step %}

### Save and test

1. Save your component, then open **Preview**. Confirm that **Description** is open and the other two section headers are collapsed.
2. Open **Specifications**. Confirm that the lamp dimensions appear and **Description** closes.
3. Open **Shipping and returns**. Check that the shipping text appears and **Specifications** closes.
4. Open **Description** again. Confirm that the description returns and **Shipping and returns** closes.
   {% endstep %}
   {% endstepper %}

## Troubleshooting

* **The wrong section opens first.** Check **Active Section(s)**. In single section mode, select only the section you want open on load.
* **Preview shows an earlier setup.** Return to **Edit**, check your settings and save the component before opening **Preview** again.
* **A header opens without any content.** Check that the **Text** component is inside the corresponding section on the canvas.

See the [Accordion reference](https://docs.avonnicomponents.com/dynamic-components/components/accordion.md) for section icons, help text and styling. Browse the [Accordion tutorials](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/accordion.md) for related guides.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/dynamic-components/tutorials/components/accordion/organize-product-details-with-accordion.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
