Git Product home page Git Product logo

yii2-bootstrap-select's Introduction

yii2-bootstrap-select

A yii2 wrapper package for the custom select for @twitter bootstrap using button dropdown http://silviomoreto.github.io/bootstrap-select/

Install via Composer

If you do not have Composer, you may install it by following the instructions at getcomposer.org.

You can then install the package using the following command:

php composer.phar require --prefer-dist cakebake/yii2-bootstrap-select "*"

or add

"cakebake/yii2-bootstrap-select": "*"

to the require section of your composer.json file and run php composer.phar update.

Usage

Add this in your view (If you want it globally, you can take the file "views/layouts/main.php"):

cakebake\bootstrap\select\BootstrapSelectAsset::register($this);

This automatically integrates the files and converts all select fields automatically.

If you want more control, you can use the available options.

cakebake\bootstrap\select\BootstrapSelectAsset::register($this, [
    'selector' => '.selectpicker', //The jQuery selector (all select forms by default)
    'menuArrow' => true, //You can also show the tick icon on single select
    'tickIcon' => false, //The bootstrap menu arrow can be added
    'selectpickerOptions' => [ //available bootstrap-select data options @see http://silviomoreto.github.io/bootstrap-select/3/#options
        'size' => 3, //example option @see http://silviomoreto.github.io/bootstrap-select/3/#options
        'width' => '50%', //example option @see http://silviomoreto.github.io/bootstrap-select/3/#options
    ],
]);

Checkout the documentation for further information.

yii2-bootstrap-select's People

Contributors

cakebake avatar daveferger avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.