Any other virtual element properties, including attributes and event handlers.
OptionalallowWhether to allow fractional display (e.g., 3.5 stars)
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
OptionalclearableWhether the rating can be cleared/reset to 0
OptionaldefaultInitial value for uncontrolled mode
OptionaldensityDensity variant
OptionaldisabledWhether the rating is disabled
OptionalgetFunction to get label text for accessibility
OptionaliconCustom icon configuration
OptionalidHTML ID for the component
OptionalkeyA key to optionally associate with this element.
OptionalmaxMaximum rating value (default: 5)
OptionalnameName for form submission
OptionalonchangeCallback when rating changes
OptionalonmouseoverCallback when rating is hovered (preview mode)
OptionalreadonlyWhether the rating is read-only
OptionalshowWhether to show tooltips on hover
OptionalsizeSize variant
OptionalstepStep size for rating increments (default: 1, can be 0.5 for half-steps)
OptionalstyleAdditional CSS styles
OptionaltooltipCustom tooltip labels for each rating value
OptionalvalueCurrent rating value
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.
Rating component attributes