CustomMenuItem
An interface that provides the ability to add custom menu item to the <UserButton /> component.
Attributes
- Name
label- Type
string- Description
The label of the custom menu item.
- Name
href?- Type
string | undefined- Description
The URL or path used to navigate to a route inside the app or an external website. It should be relative for internal routes and absolute for external links.
- Name
onClick?- Type
() => void | undefined- Description
A function to be called when the menu item is clicked.
- Name
open?- Type
string | undefined- Description
The path segment used to open a specific custom page in the user profile modal.
- Name
mountIcon?- Type
((el: HTMLDivElement) => void) | undefined- Description
This function is called to mount the icon of the label. The
elargument is the element where the icon should be mounted.
- Name
unmountIcon?- Type
((el?: HTMLDivElement) => void) | undefined- Description
This function is called to unmount the icon of the label. The
elargument is the same element that was passed to themountIconfunction.
- Name
mount?- Type
((el: HTMLDivElement) => void) | undefined- Description
This function is called to mount the content of the custom page. The
elargument is the element where the content should be mounted.
- Name
unmount?- Type
((el?: HTMLDivElement) => void) | undefined- Description
This function is called to unmount the content of the custom page. The
elargument is the same element that was passed to themountfunction.
Feedback
Last updated on