---
title: "Item"
description: "Collapsible accordion section."
---

> Documentation Index
> Fetch the complete documentation index at: https://gistui.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Item

```gistui
root = Accordion(Item("Shipping", "Free over $50. Arrives in 3 to 5 days.", open), Item("Returns", "Within 30 days."), multiple)
```

An `Item` is only valid inside `Accordion`.

## Signature

This is the line a model reads in the system prompt.

```gistui
Item(title, ...children, open)
```

- **Group:** Layout
- **Children:** Yes: any component or text
- **Positional arguments:** `title` (a trailing `?` means it may be left out)

## Props

| Prop | Type | How to write it | Notes |
|---|---|---|---|
| `title` | string | positional, required |  |
| `open` | flag | bare word: `open` |  |

## Use your own component

Keep the name and schema, swap what is drawn. The prompt and the model's output do not change.

### React

```tsx
import { ui } from "@gistui/react/ui";

const lib = ui.extend({ Item: MyItem });
<GistUI library={lib} stream={response.body} />;
```
### Vue

```vue
<GistUI :source="answer" :components="{ Item: MyItem }" />
```
### Svelte

```svelte
<GistUI source={answer} components={{ Item: MyItem }} />
```
### Solid

```tsx
<GistUI source={answer()} components={{ Item: MyItem }} />
```
### Vanilla

```ts
import { ui } from "@gistui/vanilla/ui";

const lib = ui.extend({ Item: (ctx) => ({ el: myElement(ctx) }) });
```

See [Custom components](/docs/guides/custom-components/) for the full contract. Style hook: `[data-gistui="Item"]`.

Source: https://gistui.com/docs/components/layout/item/index.mdx
