Next.js Discord

Discord Forum

How to change font family on Click

Answered
In&Out posted this in #help-forum
Open in Discord
I want to have 3 buttons, 2 to be regular fonts and 3rd to be for Dyslexic, how do i do that? This is path of dyslexic font: .\fonts\OpenDyslexic-Regular.otf

5 Replies

Anyone?
you can have a font provider and wrap it around your body and when user changes their font, pass the font.className to the provider which passes it to the body
Answer
thank you