Reputation: 136
I would like to embed a React application that uses Chakra UI into a website, but Chakra's global style affects the entire website.
Is there a way to inject Chakra's global style with a specific scope?
Upvotes: 2
Views: 3312
Reputation: 4942
I suppose you would need to use your own css reset to scope it. There is an existing codesandbox that could be useful, that I didn't author.
<ChakraProvider />
<ChakraProvider resetCSS={false}>
<div className="chakra-reset">
...
</div>
</ChakraProvider>
.chakra-reset
. You could use this and scope it.Upvotes: 8