mui / mui/material-ui

[material-ui][Link] Allow type overrides for default component

Open
#45,230 11 comments 2 reactions 1 assignee View on GitHub

@silviuaavram is already working on this.

Since Sep 1, 2026.

has workaround scope: link type: enhancement waiting for 👍
Dominant language
JavaScript
Stars
99.1k
Forks
32.5k
Avg merge
2d 17h
Merged PRs (30d)
106

Description

Summary

Currently in order to integrate other framework Link components into mui (globally) we can use

export const theme = createTheme({
  components: {
    MuiLink: {
      defaultProps: {
        component: Link,
      },
    },
  }
});

but we can't type this correctly witht what is provided for us. Other solutions are creating a custom Link component and type the props ourselves.

This would be much simpler if we could do something like:

import type NextLink from "next/link";

declare module "@mui/material/Link" {
  export interface LinkComponentOverride {
    component: typeof NextLink;
  }
}

export {};
Examples

No response

Motivation

No response

Search keywords: link typeoverrides

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.