Skip to content

ToggleButton events#

TypeDescription
onChangefunction(optional) Will be called on state changes made by the user. Returns a boolean and string { checked, value, event }.
onKeyDown(event: React.KeyboardEvent<HTMLButtonElement>) => void(optional) Will be called when a key is pressed while the toggle button has focus. Call event.preventDefault() to keep the toggle button from toggling on Enter or Space.
onKeyUp(event: React.KeyboardEvent<HTMLButtonElement>) => void(optional) Will be called when a key is released while the toggle button has focus.

ToggleButton.Group events#

TypeDescription
onChangefunction(optional) Will be called once a ToggleButton button changes the state. Returns an object { value, values, event }. <br /><br /> NB: values is only available if multiselect is used / true.
Suggest an edit