Skip to content

[lexical-react]: Add LexicalMenu styling to theme#7995

Closed
ivailop7 wants to merge 2 commits intofacebook:mainfrom
ivailop7:more_styling_lexicalmenu
Closed

[lexical-react]: Add LexicalMenu styling to theme#7995
ivailop7 wants to merge 2 commits intofacebook:mainfrom
ivailop7:more_styling_lexicalmenu

Conversation

@ivailop7
Copy link
Copy Markdown
Collaborator

Since removing the menuRenderFn from the LexicalMenu component to allow for refactoring of the rendering and positioning, removed some styling flexibility. This PR adds the following theme classes for the LexicalMenu in the react package:

  menu?: {
    container?: EditorThemeClassName;
    item?: EditorThemeClassName;
    itemSelected?: EditorThemeClassName;
    itemText?: EditorThemeClassName;
  };

this should provide enough flexibility to style completely the LexicalMenu using pure CSS.

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
lexical Ready Ready Preview Comment Nov 18, 2025 10:08pm
lexical-playground Ready Ready Preview Comment Nov 18, 2025 10:08pm

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Nov 17, 2025
@ivailop7 ivailop7 added the extended-tests Run extended e2e tests on a PR label Nov 17, 2025
Copy link
Copy Markdown
Contributor

@james-atticus james-atticus left a comment

Choose a reason for hiding this comment

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

Thanks for looking at this. Adding theming is good but doesn't quite meet the need where you have different styling for menus within the same editor.

As an example, we have a mentions typeahead menu and a text shortcuts typeahead menu with different styling. Currently we do this with menuRenderFn that constructs a container with a different class name on each. Eg:

.MentionsPlugin_typeahead-menu {
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
}

.MentionsPlugin_typeahead-menu .item {
    color: var(--text-dark);
    font-size: var(--font-medium);
    font-weight: bold;
}

I've pushed another commit here on top of your change which adds a prop that would allow us to do this (doesn't look like I can open an PR into your fork).

@ivailop7
Copy link
Copy Markdown
Collaborator Author

Thanks for looking at this. Adding theming is good but doesn't quite meet the need where you have different styling for menus within the same editor.

As an example, we have a mentions typeahead menu and a text shortcuts typeahead menu with different styling. Currently we do this with menuRenderFn that constructs a container with a different class name on each. Eg:

.MentionsPlugin_typeahead-menu {
    width: 320px;
    max-height: 300px;
    overflow-y: auto;
}

.MentionsPlugin_typeahead-menu .item {
    color: var(--text-dark);
    font-size: var(--font-medium);
    font-weight: bold;
}

I've pushed another commit here on top of your change which adds a prop that would allow us to do this (doesn't look like I can open an PR into your fork).

thanks, gave you edit to my fork, you should be able to push to the branch.

@etrepum
Copy link
Copy Markdown
Collaborator

etrepum commented Dec 10, 2025

Are we abandoning this?

@ivailop7
Copy link
Copy Markdown
Collaborator Author

Seems so, for now. Closing.

@ivailop7 ivailop7 closed this Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. extended-tests Run extended e2e tests on a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants