Search
Star
Feedback
Setup for Free
© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
MUI styles with PlasmoGetInlineAnchorList - 🧩 Plasmo Developers
�PD
🧩 Plasmo Developers
•
2y ago
•
2 replies
viktassen
MUI styles with PlasmoGetInlineAnchorList
Styles are added only for last shadow
-root
.
Please tell me how to make it work
.
/
/ Plasmo
import createCache from
"
@emotion
/cache
"
;
import
{ CacheProvider
} from
"
@emotion
/react
"
;
import
{ Button
} from
"
@mui
/material
"
;
import type
{ PlasmoCSConfig
, PlasmoGetInlineAnchorList
} from
"plasmo
"
export const config
: PlasmoCSConfig
=
{
matches
:
[
"
https://plasmo.com/*
"
]
,
}
;
export const getInlineAnchorList
: PlasmoGetInlineAnchorList
= async
(
)
=
>
{
const anchors
= document
.querySelectorAll
(
"
.myClass
"
)
return Array
.from
(anchors
)
.map
(
(element
)
=
>
(
{
element
,
insertPosition
:
"beforeend
"
,
}
)
)
}
;
const styleElement
= document
.createElement
(
"style
"
)
const styleCache
= createCache
(
{
key
:
"plasmo
-mui
-cache
"
,
prepend
: true
,
container
: styleElement
}
)
export const getStyle
=
(
)
=
> styleElement
const MyButton
=
(
)
=
>
{
return
(
<CacheProvider value
=
{styleCache
}
>
<Button
>
My Button
<
/Button
>
<
/CacheProvider
>
)
}
export default MyButton
🧩 Plasmo Developers
Join
2,796
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
PlasmoGetInlineAnchorList doesn't shift host layout
�PD
🧩 Plasmo Developers / 👟framework
3y ago
Plasmo with react and MUI
�PD
🧩 Plasmo Developers / 👟framework
2y ago
MUI with content-script-ui
�PD
🧩 Plasmo Developers / 👟framework
3y ago