PHPackages                             davide-casiraghi/bootstrap-accordion-integrator - 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. davide-casiraghi/bootstrap-accordion-integrator

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

davide-casiraghi/bootstrap-accordion-integrator
===============================================

Add accordions in your application. The accordions are based on the Bootstrap 4 collapse component.

1.2.3(6y ago)11661MITCSS

Since Mar 12Pushed 6y agoCompare

[ Source](https://github.com/davide-casiraghi/bootstrap-accordion-integrator)[ Packagist](https://packagist.org/packages/davide-casiraghi/bootstrap-accordion-integrator)[ RSS](/packages/davide-casiraghi-bootstrap-accordion-integrator/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (2)Versions (8)Used By (1)

Bootstrap 4 Accordion Integrator
================================

[](#bootstrap-4-accordion-integrator)

[![Latest Stable Version](https://camo.githubusercontent.com/5fa21fd307ca4a495685e87e9e4864b7a571f0f4d67618c4ea898b11459b1765/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461766964652d6361736972616768692f626f6f7473747261702d6163636f7264696f6e2d696e7465677261746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/davide-casiraghi/bootstrap-accordion-integrator)[![Build Status](https://camo.githubusercontent.com/aeb5f095f48ba23ada1acb114220df8e5b7551ff3a05a80329ce64e76c36612e/68747470733a2f2f7472617669732d63692e6f72672f6461766964652d6361736972616768692f626f6f7473747261702d6163636f7264696f6e2d696e7465677261746f722e737667)](https://travis-ci.org/davide-casiraghi/bootstrap-accordion-integrator)[![StyleCI](https://camo.githubusercontent.com/b57194b26d98cf6ceaa8dbf2126068ad5d0298a10ded45d19d12c2b6f9b45c78/68747470733a2f2f7374796c6563692e696f2f7265706f732f3137353139373534382f736869656c643f7374796c653d666c61742d737175617265)](https://styleci.io/repos/175197548)[![Coverage Status](https://camo.githubusercontent.com/e85adaf7c79bdf44c3732d5441d454987d010fb11ec77f9f2bf0523ecd089c8f/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6461766964652d6361736972616768692f626f6f7473747261702d6163636f7264696f6e2d696e7465677261746f722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/davide-casiraghi/bootstrap-accordion-integrator/)[![](https://camo.githubusercontent.com/78c2166a0507eec6785059eb0876f56555f162a4dcb56f8557b08996a2ec69ea/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64653935663062353536306364666237396432632f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/davide-casiraghi/bootstrap-accordion-integrator/maintainability)[![GitHub last commit](https://camo.githubusercontent.com/e4eec82547e568686f26eafe68b6d20dca559c59484e4e25ce6431f011ecddfc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6461766964652d6361736972616768692f626f6f7473747261702d6163636f7264696f6e2d696e7465677261746f722e737667)](https://github.com/davide-casiraghi/bootstrap-accordion-integrator)

**Bootstrap 4 Accordion Integrator** is a PHP library to add accordions in your application.
The accordions are based on the Bootstrap 4 **collapse component**.

The library replace all the occurances of this snippet

```
{accordion=Title First Slide}This is the first slide. {/accordion}

```

With the HTML code of a bootstrap 4 accordion.

```

        Title First Slide

        This is the first slide.

```

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

[](#installation)

To use the package you should import it trough composer.

```
composer require davide-casiraghi/bootstrap-accordion-integrator
```

### Import the scss files

[](#import-the-scss-files)

Add this line to your **resources/sass/app.scss** file:
`@import 'vendor/bootstrap-accordion-integrator/accordion';`
and then run in console:
`npm run dev`

Usage
-----

[](#usage)

To replace all the occurrance of the accordion snippets:

```
$accordion = new BootstrapAccordion('caret-svg');
$accordion->replace_accordion_strings_with_template($text);
```

or using the facade

```
$text = BootstrapAccordion::getAccordions($text, 'plus-minus-circle');
```

Icon styles (open/close)
------------------------

[](#icon-styles-openclose)

At the moment are available these icon styles that can be specified when the class get instantiated

- **caret-svg** (default - use svg with mask-image)
- **angle-svg** (use svg with mask-image)
- **plus-minus-circle** (use default font)
- **angle-fontawesome-pro** (use Font Awesome Pro 5 font-family)
- **angle-fontawesome-free** (use Font Awesome Free 4.7.0 font-family)
- **caret-fontawesome-pro** (use Font Awesome Pro 5 font-family)
- **caret-fontawesome-free** (use Font Awesome Free 4.7.0 font-family)

To use FontAwesome styles you need FontAwesome already loaded in your application.

Load the CSS and JS files
-------------------------

[](#load-the-css-and-js-files)

### Without Laravel

[](#without-laravel)

You can import the JS and the CSS files in the vendor/bootstrap-accordion/ folder.

### With Laravel

[](#with-laravel)

#### Publish the JS, CSS and IMAGES

[](#publish-the-js-css-and-images)

It's possible to customize the scss and the js publishing them in your Laravel application.

`php artisan vendor:publish`

This command will publish in your application this folders:

- /resources/scss/vendor/bootstrap-accordion/
- /resources/js/vendor/bootstrap-accordion/
- /public/vendor/bootstrap-accordion-integrator/images/

#### Load the JS file

[](#load-the-js-file)

In your app.js file you can require the accordion.js file before the Vue object get instanciated:

```
require('./bootstrap');
window.Vue = require('vue');

require('./vendor/bootstrap-accordion/accordion');

window.myApp = new Vue({
    el: '#app'
});

```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License
-------

[](#license)

[MIT](https://github.com/davide-casiraghi/bootstrap-accordion-integrator/blob/master/LICENSE.md)

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~15 days

Total

6

Last Release

2542d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d09fa0d9b2a45d611866ca55a837bf8ca2da760ef1aa250cd59f04970f90abf?d=identicon)[davide-casiraghi](/maintainers/davide-casiraghi)

---

Top Contributors

[![davide-casiraghi](https://avatars.githubusercontent.com/u/6308587?v=4)](https://github.com/davide-casiraghi "davide-casiraghi (93 commits)")

---

Tags

accordionaccordion-pluginlaravellaravel-5-packagephp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/davide-casiraghi-bootstrap-accordion-integrator/health.svg)

```
[![Health](https://phpackages.com/badges/davide-casiraghi-bootstrap-accordion-integrator/health.svg)](https://phpackages.com/packages/davide-casiraghi-bootstrap-accordion-integrator)
```

###  Alternatives

[flow-php/etl

PHP ETL - Extract Transform Load - Abstraction

374468.4k51](/packages/flow-php-etl)[sylius-labs/polyfill-symfony-security

Symfony Security Polyfill

135.9M6](/packages/sylius-labs-polyfill-symfony-security)

PHPackages © 2026

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