Optional
checkedCurrently 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.
Optional
classThe class name(s) for this virtual element, as a space-separated list.
Optional
classThe class name(s) for this virtual element, as a space-separated list.
Optional
defaultDefault 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.
Optional
disabledSets the input field to disabled.
Optional
helperAdd a description underneath the input field.
Optional
i18nInternationalization options
Optional
iconUses Materialize icons as a prefix or postfix.
Optional
idOptional ID.
Optional
isIf true, add a mandatory * after the label (if any), and add the required and aria-required attributes to the input element.
Optional
keyUnique key for use of the element in an array.
Optional
labelOptional label.
Optional
maxMax height of the dropdown menu, default '25rem'
Optional
multipleSelect a single option or multiple options
Optional
newIf true, break to a new row
Optional
noWhen no options are left, displays this text, default 'No options found'
Optional
onchangeCalled when the selection changes, contains all selected (checked) ids as an array
Optional
oncreateCallback when user creates a new option: should return new ID
Options to select from
Optional
placeholderAdd a a placeholder to the input field.
Optional
requiredAdd the required and aria-required attributes to the input element
Optional
searchPlaceholder text for the search input, default 'Search options...'
Optional
showEnable the clear icon
Optional
styleOptional style information.
Optional
onbeforeremoveThe 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.
Optional
onbeforeupdateThe onbeforeupdate hook is called before a vnode is diffed in a update.
Optional
oncreateThe oncreate hook is called after a DOM element is created and attached to the document.
Optional
oninitThe oninit hook is called before a vnode is touched by the virtual DOM engine.
Optional
onremoveThe onremove hook is called before a DOM element is removed from the document.
Optional
onupdateThe 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.