+bodyAttributes

type Value = Record<string, string>
type BodyAttributes = Value | ((pageContext) => Value)


vike-react
/vike-vue
/vike-solid
You need
vike-react
/vike-vue
/vike-solid
to be able to use this setting.
The bodyAttributes
setting adds attributes to the <body>
tag.
// pages/+config.ts
import type { Config } from 'vike/types'
export default {
// <body class="dark">
bodyAttributes: { class: 'dark' }
} satisfies Config