Skip to content

Events

PropertyTypeDescription
on_changefunction(optional) (preferred) this event gets triggered once the tab changes its selected key. Returns { key, selected_key, focus_key, event }.
on_clickfunction(optional) This event gets triggered once the tab gets clicked. Returns { key, selected_key, focus_key, event }.
on_focusfunction(optional) This event gets triggered once the tab changes its focus key. Returns { key, selected_key, focus_key, event }.
on_mouse_enterfunction(optional) This event gets triggered once the user';s mouse enters a tab (hover). Returns { key, selected_key, focus_key, event }.

Prevent a change

You can prevent a change from happening by returning false on the on_click event handler:

<Tabs
on_click={() => {
if (condition === true) {
return false
}
}}
on_change={() => {
// Will not get emitted
}}
/>