Skip to content

fix(ui): allow custom className on BUI components - #31496

Merged
Naycon merged 1 commit into
masterfrom
ui-fix-menu-classname-issue
Oct 23, 2025
Merged

Naycon merged 1 commit into
masterfrom
ui-fix-menu-classname-issue

Conversation

@Naycon

@Naycon Naycon commented Oct 22, 2025

Copy link
Copy Markdown
Collaborator

Hey, I just made a Pull Request!

Fixes className prop handling across BUI components to allow users to add custom classes that augment rather than override default styles.

Changes:

  • Extract className from cleanedProps before spreading
  • Add className as last argument to clsx() calls
  • Update type definitions to support className prop

Affected components:

  • Menu and all variants (MenuListBox, MenuAutocomplete, etc.)
  • Switch, Skeleton, FieldLabel
  • Header, HeaderToolbar, HeaderPage
  • Tabs, TabList, Tab, TabPanel

✔️ Checklist

  • A changeset describing the change and affected packages. (more info)
  • Added or updated documentation
  • Tests for new functionality and regression tests for bug fixes
  • Screenshots attached (for UI changes)
  • All your commits have a Signed-off-by line in the message. (more info)

@Naycon
Naycon requested a review from a team as a code owner October 22, 2025 13:15
@Naycon
Naycon requested a review from cdedreuille October 22, 2025 13:16
@backstage-goalie

Copy link
Copy Markdown
Contributor

Important

This PR includes changes that affect public-facing API. Please ensure you are adding/updating documentation for new features or behavior.

Changed Packages

Package Name Package Path Changeset Bump Current Version
@backstage/ui packages/ui minor v0.8.2-next.0

@github-actions

github-actions Bot commented Oct 22, 2025 •

Copy link
Copy Markdown
Contributor

🎨 Visual Testing with Chromatic

Fixes className prop handling across BUI components to allow users to
add custom classes that augment rather than override default styles.

Changes:
- Extract className from cleanedProps before spreading
- Add className as last argument to clsx() calls
- Update type definitions to support className prop

Affected components:
- Menu and all variants (MenuListBox, MenuAutocomplete, etc.)
- Switch, Skeleton, FieldLabel
- Header, HeaderToolbar, HeaderPage
- Tabs, TabList, Tab, TabPanel

Signed-off-by: Johan Persson <[email protected]>
@Naycon
Naycon force-pushed the ui-fix-menu-classname-issue branch from 5d3c146 to e256713 Compare October 22, 2025 14:11

@Rugvip Rugvip left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

👍

@Naycon
Naycon merged commit b78fc45 into master Oct 23, 2025
@Naycon
Naycon deleted the ui-fix-menu-classname-issue branch October 23, 2025 08:35
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for contributing to Backstage! The changes in this pull request will be part of the 1.45.0 release, scheduled for Tue, 18 Nov 2025.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants