Any other virtual element properties, including attributes and event handlers.
OptionalalignUse CSS grid for label/scale alignment in multi-question surveys (default: false)
Optionalaria-ARIA label for the component
Optionalaria-ARIA labelledby reference
OptionalariaARIA label for the component (camelCase alternative)
OptionalclassThe class name(s) for this virtual element, as a space-separated list.
OptionalclassClass name for the container
OptionaldefaultInitial value for uncontrolled mode
OptionaldensityDensity variant (default: 'standard')
OptionaldescriptionHelper text description
OptionaldisabledWhether the component is disabled
OptionalendAnchor label for maximum value (e.g., "Very Happy")
OptionalgetFunction to get label text for accessibility
OptionalidHTML ID for the component
OptionalisIf true, add a mandatory '*' after the label
OptionalkeyA key to optionally associate with this element.
OptionallabelQuestion/prompt text
OptionallayoutLayout mode (default: 'responsive' = horizontal on desktop, vertical on mobile)
OptionalmaxMaximum scale value (default: 5)
OptionalmiddleAnchor label for middle value (optional, e.g., "Neutral")
OptionalminMinimum scale value (default: 1)
OptionalnameName for form submission
OptionalonchangeCallback when value changes
OptionalreadonlyWhether the component is read-only
OptionalshowWhether to display numeric values (default: false)
OptionalshowWhether to show tooltips on hover (default: false)
OptionalsizeSize variant (default: 'medium')
OptionalstartAnchor label for minimum value (e.g., "Very Unhappy")
OptionalstepStep size for scale increments (default: 1)
OptionalstyleAdditional CSS styles
OptionaltooltipCustom tooltip labels for each value
OptionalvalueCurrent value for controlled mode
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.
Likert scale component attributes