npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

select2-theme-bootstrap5

v0.1.1

Published

A theme for Select2 v4 and Bootstrap 5.

Downloads

853

Readme

select2-theme-bootstrap5

select2-theme-bootstrap5 version License

A Select2 v4 Theme for Bootstrap 5

Demonstrations available.

Compatibility

Built and tested with Bootstrap v5 and Select2 v4.0.13 in the latest Chrome, Firefox and Safari (Mac).

Installation

You can download select2-theme-bootstrap5 from this GitHub repo, or install it using npm and yarn – required if you want to integrate the Sass.

Install using npm/yarn

You may install select2-theme-bootstrap5-theme with npm or Yarn:


// npm
npm install select2-theme-bootstrap5

// yarn
yarn add select2-theme-bootstrap5

Usage

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

<link rel="stylesheet" href="select2.css">
<link rel="stylesheet" href="select2-bootstrap.css">

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

$('#dropdown').select2({
    theme: 'bootstrap'
});

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

$.fn.select2.defaults.set('theme', 'bootstrap');

Changelog

0.1.1
  • libsass friendly division by 2
  • Added additional select2 examples
  • Documentation updates
0.1.0

Contributing

The project offers Sass sources for building select2-bootstrap.css; The code makes use of SCSS variables from Bootstrap. The demo pages are built using Jekyll and there are a bunch of Grunt tasks to ease development.

With Jekyll, node.js and Less installed, run

npm install

to install all necessary development dependencies (Sass is compiled vLibSass/node-sass).

  • grunt build builds docs
  • grunt serve builds docs and serves them via Jekyll's --watch flag on http://localhost:3000

Develop in src/select2-bootstrap.scss and test your changes using grunt serve. Make sure tests are passing and verify that Sass compiles down to the target CSS via npm test.

Copyright and license

Forked and modified from select2 Bootstrap 3 theme. All credits go to the original authors.

The license is available within the repository in the LICENSE file.