PHPackages                             mrshanebarron/accordion - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. mrshanebarron/accordion

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

mrshanebarron/accordion
=======================

Collapsible accordion component for Laravel - supports Livewire and Vue

v1.0.11(4mo ago)021MITPHPPHP ^8.1

Since Dec 14Pushed 4mo agoCompare

[ Source](https://github.com/mrshanebarron/accordion)[ Packagist](https://packagist.org/packages/mrshanebarron/accordion)[ RSS](/packages/mrshanebarron-accordion/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (2)Versions (13)Used By (0)

Accordion
=========

[](#accordion)

Expandable content sections with smooth animations for Laravel applications. Supports single or multiple open panels, default open state, and custom styling. Works with Livewire and Vue 3.

Installation
------------

[](#installation)

```
composer require mrshanebarron/accordion
```

Livewire Usage
--------------

[](#livewire-usage)

### Basic Usage

[](#basic-usage)

```
@php
$items = [
    'item1' => [
        'title' => 'What is this package?',
        'content' => 'A beautiful accordion component for Laravel applications.',
    ],
    'item2' => [
        'title' => 'Is it free to use?',
        'content' => 'Yes! All components are free and open source under the MIT license.',
    ],
    'item3' => [
        'title' => 'Does it support Livewire?',
        'content' => 'Absolutely! Works with Livewire and Vue.js.',
    ],
];
@endphp

```

### Default Open

[](#default-open)

```

```

### Multiple Open Panels

[](#multiple-open-panels)

```

```

### Livewire Props

[](#livewire-props)

PropTypeDefaultDescription`items`array`[]`Array of accordion items with `title` and `content` keys`multiple`boolean`false`Allow multiple panels open simultaneously`defaultOpen`string`null`Key of item to open by default### Item Structure

[](#item-structure)

```
$items = [
    'unique_key' => [
        'title' => 'Panel Title',
        'content' => 'Panel content text or HTML',
    ],
];
```

Vue 3 Usage
-----------

[](#vue-3-usage)

### Setup

[](#setup)

```
import { SbAccordion, SbAccordionItem } from './vendor/sb-accordion';
app.component('SbAccordion', SbAccordion);
app.component('SbAccordionItem', SbAccordionItem);
```

### Basic Usage

[](#basic-usage-1)

```

      Content for the first panel.

      Content for the second panel.

```

### With Default Open

[](#with-default-open)

```

      This panel is open by default.

      This panel starts closed.

```

### Multiple Open

[](#multiple-open)

```

    Content One
    Content Two

```

### Vue Props

[](#vue-props)

#### SbAccordion

[](#sbaccordion)

PropTypeDefaultDescription`multiple`Boolean`false`Allow multiple panels open`defaultOpen`String`null`ID of default open panel#### SbAccordionItem

[](#sbaccordionitem)

PropTypeDefaultDescription`id`StringautoUnique identifier`title`StringrequiredPanel header text`disabled`Boolean`false`Disable panel toggleEvents
------

[](#events)

### Livewire

[](#livewire)

```

```

### Vue

[](#vue)

```

```

Styling
-------

[](#styling)

The accordion uses Tailwind CSS classes with:

- Smooth expand/collapse animations via Alpine.js x-collapse
- Rounded corners and subtle shadows
- Hover states on headers
- Chevron icon rotation on open

Requirements
------------

[](#requirements)

- PHP 8.1+
- Laravel 10, 11, or 12
- Tailwind CSS 3.x
- Alpine.js (for animations)

License
-------

[](#license)

MIT License

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance74

Regular maintenance activity

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

12

Last Release

143d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7a38dc9b4ccc180ee3e9df8879f8747ea9dbf36812c6546827fe504fa8993eb8?d=identicon)[mrshanebarron](/maintainers/mrshanebarron)

---

Tags

laravellivewirecollapsevueaccordionexpandable

### Embed Badge

![Health badge](/badges/mrshanebarron-accordion/health.svg)

```
[![Health](https://phpackages.com/badges/mrshanebarron-accordion/health.svg)](https://phpackages.com/packages/mrshanebarron-accordion)
```

###  Alternatives

[livewire/flux

The official UI component library for Livewire.

9385.0M86](/packages/livewire-flux)[ijpatricio/mingle

Use Vue and React in Laravel Livewire Applications.

43445.4k2](/packages/ijpatricio-mingle)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

205144.8k5](/packages/bezhansalleh-filament-google-analytics)[mischasigtermans/laravel-altitude

Claude Code agents for the TALL stack, powered by Laravel Boost

1139.2k](/packages/mischasigtermans-laravel-altitude)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

116.6k](/packages/tomshaw-electricgrid)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
