Hello community. How does someone add ClassName property to <body> tag in dash?
Hello @Gaylord,
The only way to do this is via a JavaScript function, a clientside callback can handle it.
If you use pages:
app.clientside_callback(
âââfunction (n) {
document.body.classList.add(âmycustomclassâ)
return window.dash_clientside.no_update
}âââ,
Output(â_pages_contentâ,âidâ),
Input(â_pages_contentâ,âidâ)
)
Or⌠you could mess with the template. Though I wouldnât recommend this.