OptionalcheckedCurrently selected id or ids. For controlled mode, pass the current selection and provide onchange. For single select, pass a single value or array with one item. For multiple select, pass an array of selected ids.
OptionalclassThe class name(s) for this virtual element, as a space-separated list.
OptionalclassThe class name(s) for this virtual element, as a space-separated list.
OptionaldefaultDefault selected id or ids for uncontrolled mode. Only used when checkedId and onchange are not provided. The component will manage its own internal state in uncontrolled mode.
OptionaldisabledSets the input field to disabled.
OptionalhelperAdd a description underneath the input field.
Optionali18nInternationalization options
OptionaliconUses Materialize icons as a prefix or postfix.
OptionalidOptional ID.
OptionalisIf true, add a mandatory * after the label (if any), and add the required and aria-required attributes to the input element.
OptionalkeyUnique key for use of the element in an array.
OptionallabelOptional label.
OptionalmaxMax height of the dropdown menu, default '25rem'
OptionalmultipleSelect a single option or multiple options
OptionalnewIf true, break to a new row
OptionalnoWhen no options are left, displays this text, default 'No options found'
OptionalonchangeCalled when the selection changes, contains all selected (checked) ids as an array
OptionaloncreateCallback when user creates a new option: should return new ID
Options to select from
OptionalplaceholderAdd a a placeholder to the input field.
OptionalrequiredAdd the required and aria-required attributes to the input element
OptionalsearchPlaceholder text for the search input, default 'Search options...'
OptionalshowEnable the clear icon
OptionalstyleOptional style information.
OptionalonbeforeremoveThe onbeforeremove hook is called before a DOM element is detached from the document. If a Promise is returned, Mithril only detaches the DOM element after the promise completes.
OptionalonbeforeupdateThe onbeforeupdate hook is called before a vnode is diffed in a update.
OptionaloncreateThe oncreate hook is called after a DOM element is created and attached to the document.
OptionaloninitThe oninit hook is called before a vnode is touched by the virtual DOM engine.
OptionalonremoveThe onremove hook is called before a DOM element is removed from the document.
OptionalonupdateThe onupdate hook is called after a DOM element is updated, while attached to the document.
Any other virtual element properties, including attributes and event handlers.