Skip to content

Behaviours

The attributes a page writes to wire up the platform’s one controller, read off what that controller looks for. Served over MCP as vizitka://docs/behaviors, and by describe_vocabulary with topic=behaviors.

A file writes use="disclosure".

Its methods: toggle, show, close, closeOnLink, closeOnEscape.

data-controller="disclosure" data-action="keydown.esc@window->disclosure#closeOnEscape"

A file writes ref="disclosure.control".

role="button" tabindex="0" aria-expanded="false" data-disclosure-target="control" data-action="click->disclosure#toggle keydown.enter->disclosure#toggle keydown.space->disclosure#toggle"

A file writes ref="disclosure.panel".

hidden data-disclosure-target="panel" data-action="click->disclosure#closeOnLink"

A file writes ref="disclosure.backdrop".

hidden data-disclosure-target="backdrop" data-action="click->disclosure#close"