Vanilla JavaScript edition
Tame unwieldy select boxes.
Chosen makes long select boxes easier to use while preserving the native form control underneath.
Adapter quick tests
- Single select: search
ops-42, choose Operations, then clear it. - Multiple select: search
zzzzto see Other remain visible, then typeNew skilland press Enter to create it. - Groups and limits: clear the search, choose Design, then try a fourth skill. The event log reports the limit.
- Floating dropdown: open Season, then scroll the page while its wider list is open.
Latest events
Try a control above.
Use it in your project
The native edition is experimental. It does not load jQuery, Prototype, or React. The original select remains the source of submitted values; call update() after changing its options, or dispatch a native chosen:updated event.
import { Chosen } from 'chosen-jjj/native';
import 'chosen-jjj/native/styles.css';
const chosen = new Chosen(document.querySelector('#native-project'), {
allow_single_deselect: true
});
chosen.update();
chosen.destroy();