Need a way to add html attributes to the root `<html>` element
First of all, thank you for this great library!
I'm creating this issue to share a hiccup I ran into. I'm using the Mantine-UI library and for the dark mode / light mode to work properly, you need a way to add a data-mantine-color-scheme html attribute to the root HTML element.
Currently, there is no way to manage this with the Head component to modify the html element.
Maybe a solution could look like this:
const Head: React.FC = () => {
return (
<>
<html my-custom-attribute="foo" />
</>
)
}
Thank you!
Yes, that's very much on the radar. It's actually something I plan to start implementing today. Depending on how things go, the ETA could be as early as this week — let's see.
In the meantime, you can eject or patch vike-react (it's quite small like 500 LoC).
I'll probably be able to make a pre-release today.
Woah! Amazing, let me know if I can help! And no rush! :) ❤️
Turns out there is a blocker in Vike core for this, so it's going to take a little longer. (Thanks for sponsoring!)
https://vike.dev/htmlAttributes
Let us know if anything doesn't work for your use case. We look forward to gathering feedback on the new improvements to head tag management.
Amazing, thank you!