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(6mo ago)021MITPHPPHP ^8.1

Since Dec 14Pushed 6mo agoCompare

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

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

34

—

LowBetter than 75% of packages

Maintenance66

Regular maintenance activity

Popularity6

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity51

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

197d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/193358540?v=4)[Mr Shane Barron](/maintainers/mrshanebarron)[@mrshanebarron](https://github.com/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.

9527.8M128](/packages/livewire-flux)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[bezhansalleh/filament-google-analytics

Google Analytics integration for FilamentPHP

211189.7k8](/packages/bezhansalleh-filament-google-analytics)[tomshaw/electricgrid

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

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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