bootstack.events.PageChangeEvent#

class bootstack.events.PageChangeEvent(page='', prev_page=None, nav=None, data=<factory>, prev_data=None, index=0, length=0, can_back=False, can_forward=False)#

Bases: object

Fires when the active page changes (mount, will-mount, change).

can_back: bool#

Whether there is a previous page to go back to.

can_forward: bool#

Whether there is a next page to go forward to.

data: dict[str, Any]#

Arbitrary data passed to navigate(key, data=...).

index: int#

Position of this page in the navigation history.

length: int#

Total length of the navigation history.

nav: Any#

Navigation direction/context for this transition, if any.

page: str#

The key of the page now active.

prev_data: Any#

The data the previous page was navigated with.

prev_page: str | None#

The key of the previously active page, or None.