PageController

A PageController is specially written to control Framer's Page component. See the example for proper usage.

OptionTypeDefaultValueDescription
currentPagenumber0The initial currentPage for the controller.
loopbooleanfalseOptional - When true, snapToNextPage will move from the last page to the first page, and vis versa.
PropertyTypeDescription
currentPagenumberThe controller's current page.
totalPagesnumberThe controller's total number of pages.
progressnumberA normalized value, 0 when the current page is the pager's first page and 1 when the current page is the pager's last page.
loopbooleanWhether the page controller can navigate from the last page to the first page, and vis versa.
MethodDescription
snapToNextPage(direction: left or right)Change the page left or right.
snapToPage(page: number)Change the page to the given page index.
changePage(delta: number)Change the current page by the given number.

Example: