Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 1 | espaco | 1 | Select2 |
| 2 | ======= |
||
| 3 | [![Build Status][travis-ci-image]][travis-ci-status] |
||
| 4 | |||
| 5 | Select2 is a jQuery-based replacement for select boxes. It supports searching, |
||
| 6 | remote data sets, and pagination of results. |
||
| 7 | |||
| 8 | To get started, checkout examples and documentation at |
||
| 9 | https://select2.github.io/ |
||
| 10 | |||
| 11 | Use cases |
||
| 12 | --------- |
||
| 13 | * Enhancing native selects with search. |
||
| 14 | * Enhancing native selects with a better multi-select interface. |
||
| 15 | * Loading data from JavaScript: easily load items via AJAX and have them |
||
| 16 | searchable. |
||
| 17 | * Nesting optgroups: native selects only support one level of nesting. Select2 |
||
| 18 | does not have this restriction. |
||
| 19 | * Tagging: ability to add new items on the fly. |
||
| 20 | * Working with large, remote datasets: ability to partially load a dataset based |
||
| 21 | on the search term. |
||
| 22 | * Paging of large datasets: easy support for loading more pages when the results |
||
| 23 | are scrolled to the end. |
||
| 24 | * Templating: support for custom rendering of results and selections. |
||
| 25 | |||
| 26 | Browser compatibility |
||
| 27 | --------------------- |
||
| 28 | * IE 8+ |
||
| 29 | * Chrome 8+ |
||
| 30 | * Firefox 10+ |
||
| 31 | * Safari 3+ |
||
| 32 | * Opera 10.6+ |
||
| 33 | |||
| 34 | Select2 is automatically tested on the following browsers. |
||
| 35 | |||
| 36 | [![Sauce Labs Test Status][saucelabs-matrix]][saucelabs-status] |
||
| 37 | |||
| 38 | Usage |
||
| 39 | ----- |
||
| 40 | You can source Select2 directly from a CDN like [JSDliver][jsdelivr] or |
||
| 41 | [CDNJS][cdnjs], [download it from this GitHub repo][releases], or use one of |
||
| 42 | the integrations below. |
||
| 43 | |||
| 44 | Integrations |
||
| 45 | ------------ |
||
| 46 | Third party developers have create plugins for platforms which allow Select2 to be integrated more natively and quickly. For many platforms, additional plugins are not required because Select2 acts as a standard `<select>` box. |
||
| 47 | |||
| 48 | Plugins |
||
| 49 | |||
| 50 | * [Django] |
||
| 51 | - [django-easy-select2] |
||
| 52 | - [django-select2] |
||
| 53 | * [Meteor] - [meteor-select2] |
||
| 54 | * [Ruby on Rails][ruby-on-rails] - [select2-rails] |
||
| 55 | * [Wicket] - [wicketstuff-select2] |
||
| 56 | * [Yii 2][yii2] - [yii2-widget-select2] |
||
| 57 | |||
| 58 | Themes |
||
| 59 | |||
| 60 | - [Bootstrap 3][bootstrap3] - [select2-bootstrap-theme] |
||
| 61 | - [Flat UI][flat-ui] - [select2-flat-theme] |
||
| 62 | - [Metro UI][metro-ui] - [select2-metro] |
||
| 63 | |||
| 64 | Missing an integration? Modify this `README` and make a pull request back here to Select2 on GitHub. |
||
| 65 | |||
| 66 | Internationalization (i18n) |
||
| 67 | --------------------------- |
||
| 68 | Select2 supports multiple languages by simply including the right language JS |
||
| 69 | file (`dist/js/i18n/it.js`, `dist/js/i18n/nl.js`, etc.) after |
||
| 70 | `dist/js/select2.js`. |
||
| 71 | |||
| 72 | Missing a language? Just copy `src/js/select2/i18n/en.js`, translate it, and |
||
| 73 | make a pull request back to Select2 here on GitHub. |
||
| 74 | |||
| 75 | Documentation |
||
| 76 | ------------- |
||
| 77 | The documentation for Select2 is available |
||
| 78 | [through GitHub Pages][documentation] and is located within this repository |
||
| 79 | in the [`docs` folder][documentation-folder]. |
||
| 80 | |||
| 81 | Community |
||
| 82 | --------- |
||
| 83 | You can find out about the different ways to get in touch with the Select2 |
||
| 84 | community at the [Select2 community page][community]. |
||
| 85 | |||
| 86 | Copyright and license |
||
| 87 | --------------------- |
||
| 88 | The license is available within the repository in the [LICENSE][license] file. |
||
| 89 | |||
| 90 | [cdnjs]: http://www.cdnjs.com/libraries/select2 |
||
| 91 | [community]: https://select2.github.io/community.html |
||
| 92 | [documentation]: https://select2.github.io/ |
||
| 93 | [documentation-folder]: https://github.com/select2/select2/tree/master/docs |
||
| 94 | [freenode]: https://freenode.net/ |
||
| 95 | [jsdelivr]: http://www.jsdelivr.com/#!select2 |
||
| 96 | [license]: LICENSE.md |
||
| 97 | [releases]: https://github.com/select2/select2/releases |
||
| 98 | [saucelabs-matrix]: https://saucelabs.com/browser-matrix/select2.svg |
||
| 99 | [saucelabs-status]: https://saucelabs.com/u/select2 |
||
| 100 | [travis-ci-image]: https://img.shields.io/travis/select2/select2/master.svg |
||
| 101 | [travis-ci-status]: https://travis-ci.org/select2/select2 |
||
| 102 | |||
| 103 | [bootstrap3]: https://getbootstrap.com/ |
||
| 104 | [django]: https://www.djangoproject.com/ |
||
| 105 | [django-easy-select2]: https://github.com/asyncee/django-easy-select2 |
||
| 106 | [django-select2]: https://github.com/applegrew/django-select2 |
||
| 107 | [flat-ui]: http://designmodo.github.io/Flat-UI/ |
||
| 108 | [meteor]: https://www.meteor.com/ |
||
| 109 | [meteor-select2]: https://github.com/nate-strauser/meteor-select2 |
||
| 110 | [metro-ui]: http://metroui.org.ua/ |
||
| 111 | [select2-metro]: http://metroui.org.ua/select2.html |
||
| 112 | [ruby-on-rails]: http://rubyonrails.org/ |
||
| 113 | [select2-bootstrap-theme]: https://github.com/select2/select2-bootstrap-theme |
||
| 114 | [select2-flat-theme]: https://github.com/techhysahil/select2-Flat_Theme |
||
| 115 | [select2-rails]: https://github.com/argerim/select2-rails |
||
| 116 | [vue.js]: http://vuejs.org/ |
||
| 117 | [select2-vue]: http://vuejs.org/examples/select2.html |
||
| 118 | [wicket]: https://wicket.apache.org/ |
||
| 119 | [wicketstuff-select2]: https://github.com/wicketstuff/core/tree/master/select2-parent |
||
| 120 | [yii2]: http://www.yiiframework.com/ |
||
| 121 | [yii2-widget-select2]: https://github.com/kartik-v/yii2-widget-select2 |