` children defining each panel. |
## Events
Events are dispatched as `CustomEvent`s on the accordion's root `` and bubble up. Listen with `x-on:open` / `x-on:close` on the `` itself or on any ancestor.
| Event | Detail | Description |
|------------|----------------|--------------------------------------------------|
| x-on:open | `{id: string}` | Fired when an item opens. Payload identifies it. |
| x-on:close | `{id: string}` | Fired when an item closes. |
## Single-Open vs Multiple
Single-open mode (default): opening an item automatically closes any other currently-open sibling. Use the `multiple` attribute to opt out:
```blade
Opening B will close this.
Opening A will close this.
Stays open independently.
Stays open independently.
```
## Validation
- `chevron` must be `'left'` or `'right'`. Any other value raises `InvalidArgumentException`.
## Soft Customization
Soft customization allows you to override the default Tailwind CSS classes used by this component at runtime, either through a service provider or scoped per-instance.
### Customization
```php
TallStackUi::customize()
->accordion()
->block('wrapper.base', 'your-tailwind-classes');
```
### Scoped Customization
```php
TallStackUi::customize('accordion', scope: 'muted')
->block('wrapper.bordered', 'border border-dashed border-gray-400 rounded-xl');
```
Then in Blade:
```blade
Content
```
### Available Blocks
| Block Name | Purpose |
|------------------------------|-----------------------------------------------------------------------------------|
| wrapper.base | Base container styles applied to every accordion (background, width). |
| wrapper.bordered | Border, radius, shadow, and overflow clipping applied when `flat` is not set. |
| wrapper.chevron-left-cascade | Tailwind arbitrary-variant class that flips trigger layout when `chevron="left"`. |