bodyAttributes
TypeScript: object | (pageContext) => object
Environment: server
Cumulative: true
Global: true
Provided by: vike-react
/vike-vue
/vike-solid
You need to install
vike-react
/vike-vue
/vike-solid
to be able to use this setting.
The bodyAttributes
setting adds attributes to the <body>
tag.
// pages/+config.js
export default {
// <body class="dark">
bodyAttributes: { class: 'dark' }
}