UNPKG

preact-spatial-navigation

Version:

A powerful Preact library for TV-style spatial navigation with LRUD algorithm, virtualized lists/grids, and smart TV support

29 lines 1.64 kB
import type { ComponentChildren, JSX } from 'preact'; type Props = { horizontal?: boolean; /** * Use this offset to prevent the element from sticking too closely to the edges of the screen during scrolling. * This is a margin in pixels. */ offsetFromStart?: number; children: ComponentChildren; style?: JSX.CSSProperties; /** Arrow that will show up inside the arrowContainer */ descendingArrow?: JSX.Element; /** Arrow that will show up inside the arrowContainer */ ascendingArrow?: JSX.Element; /** Style props for the arrow container, basically the area hoverable that triggers a scroll */ descendingArrowContainerStyle?: JSX.CSSProperties; /** Style props for the arrow container, basically the area hoverable that triggers a scroll */ ascendingArrowContainerStyle?: JSX.CSSProperties; /** Number of pixels scrolled every 10ms - only when using web cursor pointer to scroll */ pointerScrollSpeed?: number; /** Toggles the native scrolling version of the scroll view instead of the CSS scroll */ useNativeScroll?: boolean; /** Configures the scroll duration in the case of CSS scroll */ scrollDuration?: number; testID?: string; }; export declare function SpatialNavigationScrollView({ horizontal, style, offsetFromStart, children, ascendingArrow, ascendingArrowContainerStyle, descendingArrow, descendingArrowContainerStyle, pointerScrollSpeed: _pointerScrollSpeed, useNativeScroll: _useNativeScroll, scrollDuration: _scrollDuration, testID, }: Props): JSX.Element; export {}; //# sourceMappingURL=SpatialNavigationScrollView.d.ts.map