PHPackages                             mopa/bootstrap-bundle - 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. [Templating &amp; Views](/categories/templating)
4. /
5. mopa/bootstrap-bundle

ActiveSymfony-bundle[Templating &amp; Views](/categories/templating)

mopa/bootstrap-bundle
=====================

Easy integration of twitters bootstrap into symfony2

v3.5.0(1y ago)7042.9M↓24.2%340[19 issues](https://github.com/phiamo/MopaBootstrapBundle/issues)[10 PRs](https://github.com/phiamo/MopaBootstrapBundle/pulls)20MITPHPPHP ^7.2 || ^8.0

Since Nov 27Pushed 1y ago37 watchersCompare

[ Source](https://github.com/phiamo/MopaBootstrapBundle)[ Packagist](https://packagist.org/packages/mopa/bootstrap-bundle)[ RSS](/packages/mopa-bootstrap-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (9)Versions (37)Used By (20)

MopaBootstrapBundle
===================

[](#mopabootstrapbundle)

[![Build Status](https://github.com/phiamo/MopaBootstrapBundle/workflows/Continuous%20integration/badge.svg?branch=master)](https://github.com/phiamo/MopaBootstrapBundle/actions?query=workflow%3A%22Continuous%20integration%22%20branch%3Amaster)[![SensioLabsInsight](https://camo.githubusercontent.com/242306dfaa6aac59bacde1e786b7deb07e06d4c328863e4e284d379c5b18ed4d/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f30613664626434632d373134622d343761342d623636322d3235346364663665633230382f6d696e692e706e67)](https://insight.sensiolabs.com/projects/0a6dbd4c-714b-47a4-b662-254cdf6ec208)[![Coverage Status](https://camo.githubusercontent.com/2b95bfcdc3e16ecd5d9617e61adbc033993e732b9d3c829bd215c0f552781c10/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f706869616d6f2f4d6f7061426f6f74737472617042756e646c652f62616467652e737667)](https://coveralls.io/r/phiamo/MopaBootstrapBundle)

MopaBootstrapBundle is a collection of code to integrate twitter's bootstrap () as easy as possible into your symfony () Project.

To use MopaBootstrapBundle and Twitter's Bootstrap 3 in your project add it via [composer](Resources/doc/install/1-getting-started.md)

Versions and dependencies
-------------------------

[](#versions-and-dependencies)

MopaBootstrapBundleBootstrapSymfonyPHP\[**3.4**\] (**master**)^3.0^4.4 || ^5.1 || ^6.0^7.2 || ^8.0\[**3.3**\] (**3.3**)^3.0^2.3 || ^3.0 || ^4.0\[**3.2**\] (*unmaintained*)^3.0^2.3 || ^3.0\[**3.1**\] (*unmaintained*)^3.0^2.3 || ^3.0\[**3.0**\] (*unmaintained*)^3.0^2.3 || ^3.0\[**2.3**\] (*unmaintained*)^2.0^2.3\[**2.2**\] (*unmaintained*)^2.0&gt;=2.1,&lt;2.4\[**2.1**\] (*unmaintained*)^2.0~2.1.0\[**2.0**\] (*unmaintained*)^2.0~2.0.0\[**1.x**\] (*unmaintained*)^1.0^2.0Updates
-------

[](#updates)

*New in 3.1*: The way `horizontal` works has been slightly altered due to a change in Symfony forms. This may or may not affect some behavior of your existing forms. ALL root form elements, whether they have a parent form or not will start with `horizontal` === `true` (or whatever value you set in the config). For the most part this shouldn't affect many users.

`horizontal` will also correctly pass itself down to collection types (and all child forms). So if your collection is horizontal, so will the collection items. If you want your collection items only to be inline, then you can pass these options to your collection:

```
array(
    'entry_options' => array('horizontal' => false), //   2.8+
    'options' => array('horizontal' => false),       // < 2.8
)
```

`horizontal_wrap_children` has been removed, as this can be solved using the above options.

Branches
--------

[](#branches)

To use this bundle with bootstrap 3 use the latest release:

```
composer require mopa/bootstrap-bundle twbs/bootstrap
```

Or config via composer.json

For LESS:

```
{
    "require": {
        "mopa/bootstrap-bundle": "~3.0",
        "twbs/bootstrap": "~3.3.0"
    }
}
```

For SASS:

```
{
    "require": {
        "mopa/bootstrap-bundle": "~3.0",
        "twbs/bootstrap-sass": "~3.3.0"
    }
}
```

If you wish to use the current master branch, then use the following:

```
composer require mopa/bootstrap-bundle:dev-master twbs/bootstrap:dev-master
```

For bootstrap 2 use the v2.3.x branch:

```
composer require mopa/bootstrap-bundle:2.3.x-dev twbs/bootstrap:2.3.2
```

To understand which versions are currently required have a look into `BRANCHES.md`

Documentation
-------------

[](#documentation)

The bulk of the documentation is stored in the [Resources/doc](Resources/doc) folder in this bundle In any case, if something is not working as expected after a update:

- [READ the CHANGELOG!](https://github.com/phiamo/MopaBootstrapBundle/blob/master/CHANGELOG.md)

Live Show
---------

[](#live-show)

To see the bundle, its capabilities and some more doc just have a look on

[MopaBootstrapBundle Live](http://bootstrap.mohrenweiserpartner.de)

Additional Resources:

- [MopaBootstrapSandboxBundle](http://github.com/phiamo/MopaBootstrapSandboxBundle) - Seperate live docs from code
- [symfony-bootstrap](https://github.com/phiamo/symfony-bootstrap) is also available

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

[](#installation)

Installation instructions are located in the

- [master documentation](Resources/doc/install/1-getting-started.md)

Included Features
-----------------

[](#included-features)

- Bootstrap Version detection via Composer Bridge
- Twig Extensions and templates for use with symfony2 Form component
    - control your form either via the form builder or the template engine
    - control nearly every bootstrap2 form feature
    - javascript and twig blocks for dynamic collections
- A generic Navbar class to generate your Navbar outside the template
    - helpers for dropdowns, seperators, etc.
- A generic Tab class to Manage bootstrap tabbing
- Twig templates for KnpPaginatorBundle ()
- Twig templates for CraueFormFlowBundle ()
- Twig template for KnpMenuBundle ()
    - icon support on menu links

Translations
------------

[](#translations)

If you use [KnpPaginatorBundle](https://github.com/KnpLabs/KnpPaginatorBundle) with MopaBootstrapBundle, you can translate labels to your language. To do this add new file

```
Resources/translations/pagination.[YOUR LOCALE CODE].yml
```

As example you have there Polish translation.

Versioning
----------

[](#versioning)

We aim to follow [semantic versioning](http://semver.org) with our releases.

Contribute
----------

[](#contribute)

If you want to contribute your code to MopaBootstrapBundle please be sure that your PR's are valid to Symfony2.1 Coding Standards. You can automatically fix your code for that with [PHP-CS-Fixer](http://cs.sensiolabs.org) tool.

You can see who already contributed to this project on [Contributors](https://github.com/phiamo/MopaBootstrapBundle/contributors) page

License
-------

[](#license)

This bundle is under the MIT license. For more information, see the complete [LICENSE](Resources/meta/LICENSE) file in the bundle.

###  Health Score

58

—

FairBetter than 98% of packages

Maintenance31

Infrequent updates — may be unmaintained

Popularity65

Solid adoption and visibility

Community47

Growing community involvement

Maturity80

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 68.8% 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 ~147 days

Recently: every ~334 days

Total

32

Last Release

713d ago

Major Versions

v2.2.0 → v3.0.0-beta12013-10-14

2.2.x-dev → v3.0.0-beta32013-10-25

v2.3.0 → v3.0.0-beta42014-08-06

v2.3.1 → v3.0.0-RC12015-05-29

v2.3.x-dev → v3.0.12016-07-25

PHP version history (2 changes)0.5PHP &gt;=5.3.2

v3.4.0PHP ^7.2 || ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a1fd1e7045090ca677014a06fee68bb9cfd75d4286bb8d9da181b7d1d0db032?d=identicon)[phiamo](/maintainers/phiamo)

---

Top Contributors

[![phiamo](https://avatars.githubusercontent.com/u/207291?v=4)](https://github.com/phiamo "phiamo (983 commits)")[![isometriks](https://avatars.githubusercontent.com/u/1325995?v=4)](https://github.com/isometriks "isometriks (116 commits)")[![nysander](https://avatars.githubusercontent.com/u/753327?v=4)](https://github.com/nysander "nysander (38 commits)")[![deguif](https://avatars.githubusercontent.com/u/993399?v=4)](https://github.com/deguif "deguif (31 commits)")[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (20 commits)")[![peshi](https://avatars.githubusercontent.com/u/782150?v=4)](https://github.com/peshi "peshi (19 commits)")[![MisatoTremor](https://avatars.githubusercontent.com/u/3536384?v=4)](https://github.com/MisatoTremor "MisatoTremor (19 commits)")[![bierdok](https://avatars.githubusercontent.com/u/2333728?v=4)](https://github.com/bierdok "bierdok (18 commits)")[![piotrantosik](https://avatars.githubusercontent.com/u/154553?v=4)](https://github.com/piotrantosik "piotrantosik (17 commits)")[![peterrehm](https://avatars.githubusercontent.com/u/2010989?v=4)](https://github.com/peterrehm "peterrehm (16 commits)")[![mulcek](https://avatars.githubusercontent.com/u/19647780?v=4)](https://github.com/mulcek "mulcek (16 commits)")[![havvg](https://avatars.githubusercontent.com/u/126898?v=4)](https://github.com/havvg "havvg (12 commits)")[![cordoval](https://avatars.githubusercontent.com/u/328359?v=4)](https://github.com/cordoval "cordoval (10 commits)")[![ptbello](https://avatars.githubusercontent.com/u/630963?v=4)](https://github.com/ptbello "ptbello (9 commits)")[![chrisjohnson00](https://avatars.githubusercontent.com/u/1231933?v=4)](https://github.com/chrisjohnson00 "chrisjohnson00 (9 commits)")[![sstok](https://avatars.githubusercontent.com/u/904790?v=4)](https://github.com/sstok "sstok (8 commits)")[![auipga](https://avatars.githubusercontent.com/u/876689?v=4)](https://github.com/auipga "auipga (8 commits)")[![rdohms](https://avatars.githubusercontent.com/u/94331?v=4)](https://github.com/rdohms "rdohms (8 commits)")[![mweimerskirch](https://avatars.githubusercontent.com/u/362092?v=4)](https://github.com/mweimerskirch "mweimerskirch (7 commits)")[![leonex-cs1](https://avatars.githubusercontent.com/u/10447971?v=4)](https://github.com/leonex-cs1 "leonex-cs1 (7 commits)")

---

Tags

templatebootstrapformextra formbootstrap form

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mopa-bootstrap-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mopa-bootstrap-bundle/health.svg)](https://phpackages.com/packages/mopa-bootstrap-bundle)
```

###  Alternatives

[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[genemu/form-bundle

Extra form types for your Symfony2 projects

5842.1M12](/packages/genemu-form-bundle)[braincrafted/bootstrap-bundle

BraincraftedBootstrapBundle integrates Bootstrap into Symfony2 by providing templates, Twig extensions, services and commands.

3932.0M33](/packages/braincrafted-bootstrap-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[mopa/bootstrap-sandbox-bundle

Seperate live docs from code

256.8k](/packages/mopa-bootstrap-sandbox-bundle)

PHPackages © 2026

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