Skip to content

Conversation

rubixvi
Copy link
Contributor

@rubixvi rubixvi commented Oct 14, 2025

What?

This update enables menu label props within the Payload admin interface to accept both string and ReactNode types. It allows developers to use icons, styled text, or JSX components directly in admin menu labels, improving flexibility and branding consistency in the UI.

Why?

          <NavGroup
            key={key}
            // @ts-expect-error - intentionally passing ReactNode
            label={
              <span className="text-base font-semibold text-(--theme-elevation-600) transition-all duration-300 hover:text-(--font-body)">
                {label}
              </span>
            }
            isOpen={navPreferences?.groups?.[label]?.open}
          >

Currently throws ts error when passing non-string items into the label field.

This update enables menu label props within the Payload admin interface to accept both string and ReactNode types. It allows developers to use icons, styled text, or JSX components directly in admin menu labels, improving flexibility and branding consistency in the UI.
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.

1 participant