# TallStackUI: Accordion Items > TallStackUI is a TALL Stack (Tailwind CSS, Alpine.js, Laravel, Livewire) > component library providing 65+ Blade components for building modern web interfaces. A child component of `` that defines a single collapsible panel. Each item has a trigger (clickable header) and a body (rich content). Supports per-item default-open state, custom Heroicon replacement, a full custom icon slot, and a rich trigger slot. ## Basic Usage ```blade Plain content in the panel body. ``` Item that starts expanded: ```blade Content This panel ships expanded. ``` Custom Heroicon instead of the default chevron: ```blade The icon still rotates 180° when the item opens. ``` Fully custom icon via slot: ```blade new Content. ``` Rich trigger slot (replaces the plain `title`): ```blade
John Doe Product Manager
Profile details, contact info, recent activity.
``` ## Attributes | Attribute | Type | Default | Description | |-----------|-----------------------------|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | title | string\|null | null | Text label shown in the trigger when no `` is provided. | | open | bool\|null | false | When true, the item starts expanded. | | id | string\|null | null | Stable identifier for this item. Used in event payloads (`$event.detail.id`) and test selectors. When omitted, a random identifier is generated (recommended: always pass an explicit `id` for stable behavior across Livewire re-renders). | | icon | ComponentSlot\|string\|null | null | Replacement for the default chevron. Pass a Heroicon name (e.g. `"plus-circle"`) for a string value, or use `` for full HTML control. | | trigger | ComponentSlot\|string\|null | null | Full replacement for the trigger content. When set via ``, replaces the `title`. | ## Slots | Slot | Description | |-----------|----------------------------------------------------------------------------------------------------------------------------------------| | (default) | Panel body content, shown when the item is open. | | trigger | Replaces the trigger area (normally the `title`). Useful for avatars, badges, multi-line headings. | | icon | Replaces the default chevron with arbitrary HTML. Rotation-on-open styling is not applied to slot content — the slot is emitted as-is. | ## Icon Prop vs Icon Slot The `icon` prop accepts two shapes: - **String** (e.g. `icon="plus-circle"`): renders a Heroicon with the standard rotation transition when the item opens/closes. - **Slot** (`...`): renders the provided HTML exactly as-is. No rotation transform is applied — you control any open/closed state yourself, for example: ```blade Content. ``` ## Test Selectors Each item renders two stable `dusk` selectors derived from its `id`: | Selector | Target | |---------------------------------------|-------------------------------| | `@tallstackui_accordion_trigger_{id}` | The clickable trigger button. | | `@tallstackui_accordion_content_{id}` | The animated content panel. | Use them in Dusk tests: ```php ->click('@tallstackui_accordion_trigger_faq-1') ->waitForText('Expected body text') ``` ## Soft Customization Soft customization allows you to override default Tailwind CSS classes used by this component at runtime. ### Customization ```php TallStackUi::customize() ->accordion('items') ->block('item.trigger.base', 'your-tailwind-classes'); ``` ### Available Blocks | Block Name | Purpose | |---------------------|-------------------------------------------------------------------------| | item.wrapper | Per-item container (includes the inter-item divider). | | item.trigger.base | Base classes for the `