Skip to content

a-scroll

ScrollElement

A scroll-container that can remember its scroll position throughout navigations.

Example


<a-scroll>
<div class="sidebar-content sl-flex">
<slot name="sidebar" />
</div>
</a-scroll>

Attributes


Name Type Default value Description
name string ""

The unique name of the scroll container. Fallback is className + className of the parent element.

strategy "session" | "history" "session"

Strategy to use for storing the scroll position, can be "session" or "history"