useSnapPaging

Alignment target:@astryxdesign/core v0.7.1 · useSnapPaging

Parameters #

NameTypeDefaultDescription
optionsMaybeRefOrGetter<SnapPagingOptions>{}Paging options, or a ref or getter that returns them. Read at each flick, so a new value applies from the next one.
options.pages'view' | 'item''view'What one flick moves. 'view' moves one view and lands on the item start edge nearest one viewport on; 'item' moves one item.

Returns #

NameTypeDescription
pagingSnapPagingSnap paging for Carousel's hasSnap. Carousel attaches it to its scroll area on mount and keeps the value it first attached; switching back to true or false detaches it.