Easy integration of twitters bootstrap into symfony2

Installs: 559 832

Dependents: 50

Stars: 671

Watchers: 43

Forks: 390

Open Issues: 30

Language: CSS

Type: symfony-bundle


Build Status SensioLabsInsight Coverage Status

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

To use MopaBootstrapBundle and Twitter's Bootstrap 3 in your project add it via composer


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

composer require mopa/bootstrap-bundle twbs/bootstrap

Or config via composer.json


    "require": {
        "mopa/bootstrap-bundle": "v3.0.0-rc1",
        "twbs/bootstrap": "~3.3.0"


    "require": {
        "mopa/bootstrap-bundle": "v3.0.0-rc1",
        "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


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

Live Show

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

MopaBootstrapBundle Live

Additional Resources:


Installation instructions are located in the

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


If you use 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.


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 tool.

You can see who already contributed to this project on Contributors page


This bundle is under the MIT license. For more information, see the complete LICENSE file in the bundle.