Skip to content

fix(mui): apply MUI styling props to Breadcrumb links#7463

Open
salluexez wants to merge 2 commits into
refinedev:mainfrom
salluexez:fix-mui-breadcrumb-styling
Open

fix(mui): apply MUI styling props to Breadcrumb links#7463
salluexez wants to merge 2 commits into
refinedev:mainfrom
salluexez:fix-mui-breadcrumb-styling

Conversation

@salluexez

Copy link
Copy Markdown

Description

Fixes a regression in the Breadcrumb component where MUI styling props
(sx, underline, color, variant) were being rendered as invalid
HTML attributes on a bare <span> instead of being applied to an actual
MUI Link component.

Changes

  • Modified LinkRouter to wrap content in <MuiLink component="span">
    instead of a plain <span>
  • This ensures MUI styling props are properly applied
  • Fixes flex alignment, hover underline, color inheritance, and typography

Impact

  • ✅ Breadcrumb links now styled with flex alignment
  • ✅ Hover underline effect works
  • ✅ Color inheritance applied correctly
  • ✅ Typography variant sizing correct

Testing

  • All 425 MUI tests pass ✅
  • Package builds successfully ✅

Closes #7462

- Replace <span> with MuiLink component in LinkRouter

- Ensures sx, underline, color, variant props actually style the links

- Fixes flex alignment, hover underline, color inheritance, and typography

- Resolves regression from v5 migration (refinedev#6945)

Fixes refinedev#7462
Copilot AI review requested due to automatic review settings June 21, 2026 16:44
@changeset-bot

changeset-bot Bot commented Jun 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b8e6fc8

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@refinedev/mui Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Fixes a regression in @refinedev/mui Breadcrumb rendering where MUI LinkProps styling props (sx, underline, color, variant) were being forwarded onto a plain DOM <span> (producing invalid/inert HTML attributes) instead of being applied via an MUI component.

Changes:

  • Updated LinkRouter to render a <MuiLink component="span"> inside the router <Link>, so MUI styling props are handled by MUI rather than the DOM.
  • Restores expected breadcrumb link styling behavior (typography variant, underline-on-hover, color inheritance, flex alignment).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

[BUG] MUI Breadcrumb links lose all styling — sx/underline/color/variant spread onto a plain <span>

2 participants