react-snaplist-carousel
Version:
A light, pure React, no dependencies and flexible carousel. A modern way to do a classic thing.
36 lines (35 loc) • 996 B
TypeScript
import * as React from 'react';
interface CarouselProps extends React.HTMLAttributes<HTMLDivElement> {
direction: 'horizontal' | 'vertical';
disableScroll?: boolean;
snapType?: 'mandatory' | 'proximity';
width?: string;
height?: string;
scrollPadding?: {
top?: string;
right?: string;
bottom?: string;
left?: string;
};
hideScrollbar?: boolean;
disabled?: boolean;
className?: string;
}
export declare const SnapList: React.ForwardRefExoticComponent<CarouselProps & {
children?: React.ReactNode;
} & React.RefAttributes<HTMLDivElement>>;
export declare const SnapItem: React.FC<{
margin?: {
top?: string;
right?: string;
bottom?: string;
left?: string;
};
width?: string;
height?: string;
snapAlign: 'start' | 'center' | 'end' | 'none';
forceStop?: boolean;
className?: string;
children?: React.ReactNode;
}>;
export {};