# Accordion

## Features

* Full keyboard navigation.
* Supports horizontal/vertical orientation.
* Supports Right to Left direction.
* Can expand one or multiple items.
* Can be controlled or uncontrolled.

## How to use the Radix UI Accordion

The Accordion Component is in the "Components Panel" under the "Radix" section. Click on it or drag it onto the canvas. The Accordion will populate a template that's easy to adjust for your needs.

<figure><img src="/files/FlzI6ENbJxru8yVW8ZQ1" alt="" width="308"><figcaption><p>Radix UI components within Webstudio</p></figcaption></figure>

You can edit, delete or add more Accordions with ease by copying/pasting any of the "item" components within the Accordion.

<figure><img src="/files/snnvolSIvRkWWpxB6dwj" alt=""><figcaption></figcaption></figure>

## Changing an Accordion's content

To change the content of an Accordion that isn't currently displayed in the canvas, click on the "item content" instance that you want to change and it will be displayed.

<figure><img src="/files/A1tb9eDvQTihpPVeFUsJ" alt=""><figcaption></figcaption></figure>

## Using Collections within Accordions

To create an accordion with a [Collection](/university/core-components/collection.md) that iterates over data and outputs an accordion item for each entry, ensure each item has a unique value set, like this:

<figure><img src="/files/MD0gOfeF5myzR20Wxa8n" alt="accordion collection unique item"><figcaption></figcaption></figure>

## Related Videos

{% embed url="<https://www.youtube.com/watch?v=PhCRSML1-G8>" %}

## Related

* [Collapsible](/university/radix/collapsible.md) – Single expandable/collapsible panel
* [Tabs](/university/radix/tabs.md) – Organize content into switchable panels
* [Dialog](/university/radix/dialog.md) – Modal window for focused content
* [Collection](/university/core-components/collection.md) – Generate accordion items dynamically from data


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.webstudio.is/university/radix/accordion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
