Navigation attributes

Vegvisir has a few attributes that can be added to elements that can be used to bind navigations and change navigation behavior without JavaScript.

string

vv

This attribute can be added to any clickable HTML element to bind it like an anchor tag.

The value of this attribute should be a string with a pathname to the page that should be loaded.

An element with this attribute will be treated just like an anchor tag, which means (by default) the vv-shell will be navigated.

Note: If added to an anchor tag, the anchor href will be prefered - and the vv will be ignored.

string

vv-position

A Navigation.POSITION string that determines where the contents of vv (or href on an anchor tag) should be injected relative to the element with this attribute.

string

vv-mode

A Navigation.MODE string that determines how the contents of vv (or href on an anchor tag) should be injected relative to the element with this attribute.


Wrapper attributes

Vegvisir sets a few attributes on elements that wrap soft-navigated content. These attributes are created automatically when it's the first time an element is used as a wrapper.

string

vv-page

This attribute's value will be updated with the pathname of the page that was soft-navigated to.

The attribute is set when a navigation is initiated.

bool

vv-loading

The value of this attribute will be a string-boolean with a value of "true" or "false".

this attribute will be "true" when a navigation is initiated, and set to "false" when the contents of the target page has been fully loaded (DOM ready).