UNPKG

react-touch-drag-slider

Version:
28 lines (27 loc) 1.11 kB
interface SliderProps { children: JSX.Element[]; onSlideComplete?: (index: number) => void; onSlideStart?: (index: number) => void; activeIndex?: number | null; threshHold?: number; transition?: number; scaleOnDrag?: boolean; } /** * * @param props.children - An array of valid React Children * @param props.onSlideComplete - An optional function that will be called when * the slide is in it's finished position * @param props.onSlideStart - An optional function that will be called when the * slide starts it's movement * @param props.activeIndex - Use to set the starting index or to upate the * current shown slide * @param props.threshHold - A pixel value that must be dragged before slide * snaps into place * @param props.transition - The transition delay in seconds * @param props.scaleOnDrag - Choose if the slide should have a scale animation * while moving * */ declare function Slider({ children, onSlideComplete, onSlideStart, activeIndex, threshHold, transition, scaleOnDrag, }: SliderProps): import("react/jsx-runtime").JSX.Element; export default Slider;