# Collapsible

Collapsible content is often found in tables. By expanding or collapsing an element the user has easy access to additional information without leaving the current view.

### Using icons

An icon is often used on the button to expand or collapse an element. The icon should point in the direction of the action; it should not illustrate the current state. E.g. if you were to swap the icon with text it should say "Expand" when collapsed and "Collapse" when expanded.

| :no\_entry\_sign: Don't                                             | :heavy\_check\_mark:  Do                                            |
| ------------------------------------------------------------------- | ------------------------------------------------------------------- |
| <img src="/files/-M8PzHo5Dr2rhEEte_0V" alt="" data-size="original"> | <img src="/files/-M8Q--01T-rbabzoLsn7" alt="" data-size="original"> |
| The icon points in the wrong direction of what will happen.         | The icon illustrates what will happen when clicking on it.          |

If a large number of lines are expandable, you can provide a button to expand/collapse all items at once.


---

# 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://dev.xena.biz/xena-developer/user-interface/styleguide/collapsible.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.
