Optional
allowAllow format toggle between 12h/24h (for inline mode)
Optional
autoOptional
autocompleteThe autocomplete property sets or returns the value of the autocomplete attribute in a text field. When autocomplete is on, the browser automatically complete values based on values that the user has entered before.
Optional
autofocusWhen true, add the autofocus attribute to the input field.
Optional
canShow a clear button (small 'x') to clear the input value. Only valid for TextInput.
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
clearClear button label
Optional
closeClose button label
Optional
colsNumber of cols of a textarea
Optional
containerOptional
dataWill replace the helperText, if any, when the input is invalid.
Optional
dataWill replace the helperText, if any, when the input is valid.
Optional
defaultOptional
defaultInitial value for uncontrolled mode. Only used when value
and oninput
are not provided.
In uncontrolled mode, the component manages its own internal state.
Optional
dialOptional
disabledSets the input field to disabled.
Optional
durationOptional
fromOptional
heightFor vertical range inputs: height of the slider
Optional
helperAdd a description underneath the input field.
Optional
i18nOptional
iconUses Materialize icons as a prefix or postfix.
Optional
idOptional ID.
Optional
innerOptional
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
maxWhen input type is a number, optionally specify the maximum value.
Optional
maxWhen input type is a text or text area, optionally specify the maximum length.
Optional
maxFor range inputs with minmax: initial maximum value
Optional
minWhen input type is a number, optionally specify the minimum value.
Optional
minWhen input type is a text or text area, optionally specify the minimum length.
Optional
minmaxFor range inputs: enable dual thumb (min/max) range selection
Optional
minFor range inputs with minmax: initial minimum value
Optional
newIf true, break to a new row
Optional
onblurInvoked when the element looses focus
Optional
onchangeInvoked when the input looses focus. For range sliders with minmax, second parameter is maxValue.
Optional
onOptional
onOptional
oninputInvoked when the value changes (immediate feedback). For range sliders with minmax, second parameter is maxValue.
Optional
onkeydownKey down event
Optional
onkeypressKey press event
Optional
onkeyupKey up event
Optional
onOptional
onOptional
onOptional
onOptional
outerOptional
patternThe pattern property sets or returns the value of the pattern attribute of a text field. The pattern attribute specifies a regular expression that the text field's value is checked against.
Optional
placeholderAdd a a placeholder to the input field.
Optional
readThe readOnly property sets or returns whether a text field is read-only, or not. A read-only field cannot be modified. However, a user can tab to it, highlight it, and copy the text from it.
Optional
requiredAdd the required and aria-required attributes to the input element
Optional
rowsNumber of rows of a textarea
Optional
showOptional
styleOptional style information.
Optional
tickOptional
tooltipFor range inputs with valueDisplay: position of value tooltips
Optional
twelveOptional
useUse inline mode (HTML5 time input) instead of modal, default true
Optional
validateWhen returning true or an empty string, clear the custom validity (= valid). When returning false, set the custom validity message to a default string string. When returning a non-empty string, set the custom validity message to this string.
Optional
valueCurrent value of the input field. If provided along with oninput
, the component operates in controlled mode
where the parent manages the state. The parent must update this value in response to oninput
callbacks.
Optional
valueFor range inputs: control value display behavior. 'auto' shows on drag, 'always' shows always, 'none' never shows
Optional
verticalFor range inputs: render vertically instead of horizontally
Optional
vibrateOptional
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.