Skip to content
 
 

Latest commit

 

History

9 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

A Select2 v4 Theme for Bootstrap v5.0.0-beta1

select2-bootstrap5 version License Bootstrap select2-bootstrap5-rtl select2-bootstrap5-ltr

Compatibility

Built and tested with Bootstrap v5.0.0-beta1 and Select2 v4.0.13 in the latest Chrome, Firefox. It will support both rtl and ltr direction.

Installation

You can download select2 bootstrap5 theme from this GitHub repo, and install the compiled CSS with bellow instructions.

Usage

select2 bootstrap5 theme only works with Select2 v4.x. Applying the theme requires select2-bootstrap5.min.css referenced after the default select2.min.css that comes with Select2:

<link rel="stylesheet" href="select2.min.css">
<link rel="stylesheet" href="select2-bootstrap5.min.css">
<script src="select2.min.js" type="text/javascript"></script>

To apply the theme, tell Select2 to do so by passing bootstrap5 to the theme option when initializing Select2:

$( "#your-dropdown" ).select2({
    theme: "bootstrap5"
});

You may also set it as the default theme for all Select2 widgets like so:

$.fn.select2.defaults.set( "theme", "bootstrap5" );

Changelog

0.0.1-beta.1

The first release

Copyright and license

This theme created by Morteza Fard Saffari (ArizoTech Co.) And licensed under MIT License

About

A Select2 v4 Theme for Bootstrap v5.0.0-beta1

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors