Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JavaScript example for custom menu items in <UserButton /> #1650

Conversation

nikospapcom
Copy link
Member

@nikospapcom nikospapcom commented Oct 24, 2024

Explanation:

This PR:

Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1650

@nikospapcom nikospapcom marked this pull request as ready for review October 24, 2024 14:25
@nikospapcom nikospapcom requested a review from a team as a code owner October 24, 2024 14:25

To add custom menu items to the `<UserButton />` component using the [JavaScript SDK](/docs/references/javascript/overview), you can pass the `customMenuItems` property to the `mountUserButton` method, as shown in the following example:

<CodeBlockTabs options={['NPM module', '<script>']}>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's an example for adding a custom link to the userbutton, but where is the example for adding a custom action?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alexisintech alexisintech marked this pull request as draft October 28, 2024 19:00
@alexisintech alexisintech changed the title chore: Add custom menu items JavaScript example Add custom menu items JavaScript example Oct 28, 2024
@nikospapcom nikospapcom force-pushed the nikospap/user-868-add-vanilla-js-example-for-custom-menu-items-in-userbutton branch from a262883 to 01db99d Compare October 29, 2024 07:48
@nikospapcom nikospapcom marked this pull request as ready for review October 29, 2024 07:50
@alexisintech alexisintech changed the title Add custom menu items JavaScript example Add JavaScript example for custom menu items in <UserButton /> Oct 30, 2024
@nikospapcom nikospapcom merged commit 6ef932f into main Nov 1, 2024
4 checks passed
@nikospapcom nikospapcom deleted the nikospap/user-868-add-vanilla-js-example-for-custom-menu-items-in-userbutton branch November 1, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants