Skip to content
On this page

Configuration

VitePress comes with built in Markdown Extensions.

Commonly used options

OptionUse
data-controller="toggler"Initialize the controller, recommended in body
data-action="toggler#statesFires the event to change the variables set in data-toggler-states
data-toggler-states="+a,-b,c"Define what variables to change and how.
Multiple vars can be changed at once separated by commas. + means on, - means off, var name means toggle.

Not so commonly used options

OptionUse
data-toggler-initial="+a,-b,c"When an element is connected, the controller will try to guess its state based on their classes. Using this option will force the initial state of some vars instead of guessing.