PHPackages                             timhovius/bootstrap-material-design - 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. timhovius/bootstrap-material-design

ActiveLibrary[Templating &amp; Views](/categories/templating)

timhovius/bootstrap-material-design
===================================

Bootstrap material theme for Symfony2

81.1kCSS

Since Sep 15Pushed 10y ago2 watchersCompare

[ Source](https://github.com/timhovius/bootstrap-material-design)[ Packagist](https://packagist.org/packages/timhovius/bootstrap-material-design)[ RSS](/packages/timhovius-bootstrap-material-design/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

[![build status](https://camo.githubusercontent.com/2e5c630faffd009ee351d9732e99cf4e2b858aacf31711727f6bc1b3cee9cb1e/68747470733a2f2f7472617669732d63692e6f72672f46657a5672617374612f626f6f7473747261702d6d6174657269616c2d64657369676e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/FezVrasta/bootstrap-material-design)

[![banner](https://github.com/FezVrasta/bootstrap-material-design/raw/master/demo/imgs/banner.jpg)](#)

This Bootstrap theme is an easy way to use the new [Material Design guidelines by Google](http://www.google.com/design/spec/material-design/introduction.html) in your Symfony2 application.

**NOTE**: This theme is still in development, it could be used on production websites but I can't guarantee compatibility with previous versions.

Check out [the demo at this link](http://fezvrasta.github.io/bootstrap-material-design/).

How to install
--------------

[](#how-to-install)

Add the folowing line to your composer.json file: `"timhovius/bootstrap-material-design": "dev-master"`
Run `php composer.phar install` and the bundle can be used now.

\###Bonus If you want to use this bundle with the BraincraftedBootstrapBundle, you have to add the following lines to your `config.yml`:

```
# Assetic Confguration
...
assets:
    bootstrap_css:
        inputs:
            - %kernel.root_dir%/../vendor/twbs/bootstrap/less/bootstrap.less
            - %kernel.root_dir%/../vendor/timhovius/bootstrap-material-design/less/ripples.less
            - %kernel.root_dir%/../vendor/timhovius/bootstrap-material-design/less/material.less
            - %kernel.root_dir%/../vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/less/form.less
        filters:
            - less
            - cssrewrite
        output: css/material.css
    bootstrap_js:
        inputs:
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/transition.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/alert.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/button.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/carousel.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/collapse.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/dropdown.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/modal.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/tooltip.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/popover.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/scrollspy.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/tab.js
            - %kernel.root_dir%/../vendor/twbs/bootstrap/js/affix.js
            - %kernel.root_dir%/../vendor/timhovius/bootstrap-material-design/scripts/ripples.js
            - %kernel.root_dir%/../vendor/timhovius/bootstrap-material-design/scripts/material.js
            - %kernel.root_dir%/../vendor/braincrafted/bootstrap-bundle/Braincrafted/Bundle/BootstrapBundle/Resources/js/bc-bootstrap-collection.js
        output: js/material.js

```

And in the `braincrafted_bootstrap` section you have to set `assetic` to `false` and set the `assets_dir` to the `bootstrap-material-design` folder.

```
braincrafted_bootstrap:
    ...
    assets_dir: %kernel.root_dir%/../vendor/timhovius/bootstrap-material-design
    ...
    auto_configure:
        assetic: false
        ...

```

You can use the basic template from the BraincraftedBootstrapBundle to include the CSS and JavaScript files:

```

    Bootstrap 101 Template

    {% include 'BraincraftedBootstrapBundle::ie8-support.html.twig' %}

    Hello, world!

        $(function() {
            $.material.init();
        });

```

#### material-wfont.less or material.less?

[](#material-wfontless-or-materialless)

The only difference is that `material-wfont.less` has the Google web fonts included.

Documentation
=============

[](#documentation)

Material Design for Bootstrap provides some additional stuff to get the best from Material Design.

### Variations

[](#variations)

There are 17 additional color variations (in addition to the classic 4 variations) for buttons, inputs, checkboxes, radios, alerts, navbars, tabs, labels, paginations, progress bars and more. They can be used by adding the class suffix `-material-color` to the desired element and replacing `color` with the desired one.

Example:

```
Deep purple button

```

These colors are taken from the Material Design color palette and are reported below:

[![palette](demo/imgs/palette.jpg)](demo/imgs/palette.jpg)

### Buttons

[](#buttons)

Add `.btn-flat` to a button to make it flat, without shadows. Add `.btn-raised` to a button to add a permanent shadow to it.

### Inputs

[](#inputs)

Add `.floating-label` to an input field with a `placeholder` to transform the placeholder in a floating label.

Add `data-hint="some hint"` to show an hint under the input when the user focus it.

Remember to use the proper HTML markup to get radio and checkboxes styled correctly (choose between *radio* or *checkbox*):

```

        Option one is this

```

### Icons

[](#icons)

Material Design for Bootstrap includes 490 original Material Design icons! These icons are extracted from the original Google sources and are licensed under the BSD license. They are provided as an iconic and easy to use font.

Variations are available for every icon, including the original Bootstrap icons.

The syntax to add a Material icon is:

```

```

Material.js
-----------

[](#materialjs)

`Material.js` is a jQuery plugin that adds some magic to your markup and allows Material Design for Bootstrap to style some elements like inputs, checkboxes, radios etc.

### Functions

[](#functions)

- `$.material.init()` - shortcut to run all the following commands:
- `$.material.ripples()` will apply ripples.js to the default elements.
- `$.material.input()` will enable the MD style to the text inputs, and other kind of inputs (number, email, file etc).
- `$.material.checkbox():` will enable the MD style to the checkboxes (remember to follow the markup guidelines explained in the [Inputs section](#inputs).
- `$.material.radio():` will enable the MD style to the checkboxes (remember to follow the markup guidelines explained in the Inputs section.

### Apply Material.js only to specific elements

[](#apply-materialjs-only-to-specific-elements)

Every function expects an optional value that will be used as a selector for the function; for example, `$.material.ripples("#selector, #foobar")` will apply Ripples.js only to `#selector` and `#foobar`. The functions that allows an optional selector are `$.material.ripples`, `$.material.input`, `$.material.checkbox` and `$.material.radio`.

You can even override the default values using the `$.material.options` function. The default values are:

```
$.material.options = {
    "withRipples": ".btn:not(.btn-link), .card-image, .navbar a:not(.withoutripple), .nav-tabs a:not(.withoutripple), .withripple",
    "inputElements": "input.form-control, textarea.form-control, select.form-control",
    "checkboxElements": ".checkbox > label > input[type=checkbox]",
    "radioElements": ".radio > label > input[type=radio]"
}

```

### Arrive.js support

[](#arrivejs-support)

If you need to dynamically add elements to your DOM then you may need to include `Arrive.js` before `Material.js`. This will automatically apply `Material.js` to every new element added via JavaScript.

Plugins
-------

[](#plugins)

Material Design for Bootstrap comes with styling support for various external scripts:

### SnackbarJS

[](#snackbarjs)

Create snackbars and toasts with the [SnackbarJS plugin](https://github.com/FezVrasta/snackbarjs). The default toast style is the squared one (snackbar style). If you like to use the rounded style (toast style), please add the `toast` class to the `style` option of SnackbarJS.

### RipplesJS

[](#ripplesjs)

This is part of the Material Design for Bootstrap project and is a plain JavaScript script which creates the ripple effect when clicking on the specified elements. At the moment RipplesJS does not have its own repository but it will probably have one in the future.

You may want to set a custom color to the ripples of a specific element, to do so write:

```
Custom ripple

```

### noUiSlider

[](#nouislider)

Make cross-browser sliders and get them styled with Material Design thanks to the support provided by this theme. Read more about [noUiSlider here](http://refreshless.com/nouislider/).

### Dropdown.js

[](#dropdownjs)

Finally a dropdown plugin that transforms select inputs in nice dropdowns and does not drive you crazy. Read more about [Dropdown.js here](https://github.com/FezVrasta/dropdown.js).

### Selectize.js

[](#selectizejs)

Transform select and multi-select inputs into advanced text inputs. Material Design for BS provides a full replacement of the plugin's CSS, so don't include it. Read more about [selectize.js](http://brianreavis.github.io/selectize.js/).

Compatibility
-------------

[](#compatibility)

Currently, Material Design for Bootstrap supports Google Chrome (tested v37+), Mozilla Firefox (tested 30+), and Internet Explorer (tested 11+). Mobile browsers are not currently tested but they may work.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community21

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor6

6 contributors hold 50%+ of commits

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bcf9d7869c19ea708c1da4f1fb74d1513fb9b0fe84ebd8aeb4f8002fca9d3755?d=identicon)[timhovius](/maintainers/timhovius)

---

Top Contributors

[![timhovius](https://avatars.githubusercontent.com/u/7972792?v=4)](https://github.com/timhovius "timhovius (14 commits)")[![GradyD](https://avatars.githubusercontent.com/u/994964?v=4)](https://github.com/GradyD "GradyD (14 commits)")[![nelsonomuto](https://avatars.githubusercontent.com/u/1546207?v=4)](https://github.com/nelsonomuto "nelsonomuto (13 commits)")[![npvn](https://avatars.githubusercontent.com/u/5188806?v=4)](https://github.com/npvn "npvn (11 commits)")[![korgan00](https://avatars.githubusercontent.com/u/4138279?v=4)](https://github.com/korgan00 "korgan00 (10 commits)")[![TransitoryBliss](https://avatars.githubusercontent.com/u/7187639?v=4)](https://github.com/TransitoryBliss "TransitoryBliss (10 commits)")[![jmillspaysbills](https://avatars.githubusercontent.com/u/4400160?v=4)](https://github.com/jmillspaysbills "jmillspaysbills (6 commits)")[![icyflame](https://avatars.githubusercontent.com/u/3668034?v=4)](https://github.com/icyflame "icyflame (5 commits)")[![dandv](https://avatars.githubusercontent.com/u/33569?v=4)](https://github.com/dandv "dandv (5 commits)")[![8aginski](https://avatars.githubusercontent.com/u/1757440?v=4)](https://github.com/8aginski "8aginski (4 commits)")[![coliff](https://avatars.githubusercontent.com/u/1212885?v=4)](https://github.com/coliff "coliff (4 commits)")[![grvcoelho](https://avatars.githubusercontent.com/u/7416751?v=4)](https://github.com/grvcoelho "grvcoelho (4 commits)")[![ryanmcdonough](https://avatars.githubusercontent.com/u/86820?v=4)](https://github.com/ryanmcdonough "ryanmcdonough (4 commits)")[![Saranya-Raaj](https://avatars.githubusercontent.com/u/3690556?v=4)](https://github.com/Saranya-Raaj "Saranya-Raaj (3 commits)")[![pmarti](https://avatars.githubusercontent.com/u/10057?v=4)](https://github.com/pmarti "pmarti (2 commits)")[![dciccale](https://avatars.githubusercontent.com/u/539546?v=4)](https://github.com/dciccale "dciccale (2 commits)")[![kylerberry](https://avatars.githubusercontent.com/u/2123735?v=4)](https://github.com/kylerberry "kylerberry (2 commits)")[![rougin](https://avatars.githubusercontent.com/u/6078637?v=4)](https://github.com/rougin "rougin (2 commits)")[![liliakai](https://avatars.githubusercontent.com/u/1039940?v=4)](https://github.com/liliakai "liliakai (2 commits)")[![craftzdog](https://avatars.githubusercontent.com/u/1332805?v=4)](https://github.com/craftzdog "craftzdog (2 commits)")

### Embed Badge

![Health badge](/badges/timhovius-bootstrap-material-design/health.svg)

```
[![Health](https://phpackages.com/badges/timhovius-bootstrap-material-design/health.svg)](https://phpackages.com/packages/timhovius-bootstrap-material-design)
```

###  Alternatives

[limenius/react-bundle

Client and Server-side react rendering in a Symfony Bundle

3851.2M](/packages/limenius-react-bundle)[area17/laravel-auto-head-tags

Laravel Auto Head Tags helps you build the list of head elements for your app

4616.1k](/packages/area17-laravel-auto-head-tags)[jelix/wikirenderer

WikiRenderer is a library to generate HTML or anything else from wiki content.

1712.3k1](/packages/jelix-wikirenderer)[webkinder/sproutset

A Composer package for handling responsive images in Roots Bedrock + Sage + Blade projects.

282.2k](/packages/webkinder-sproutset)

PHPackages © 2026

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