vue-directional-carousel
Version:
This is a Vue 3 component that allows you to set the direction of image movement not only vertically and horizontally but also in different directions (left, right, up, down).
10 lines (9 loc) • 594 B
TypeScript
import { type Ref, type ComputedRef } from 'vue';
import { type VerticalCarouselProps, type CarouselComputedItemsType, type DirectionProps } from '@/types/props';
export default function useRenderTransition(props: VerticalCarouselProps, renderItems: CarouselComputedItemsType, currentIndex: Ref<number>, numberWidth: ComputedRef<number>, numberHeight: ComputedRef<number>): {
itemsTranslate: ComputedRef<string>;
defaultTransition: Ref<string, string>;
transition: Ref<string, string>;
isTransitioning: Ref<boolean, boolean>;
directionProps: ComputedRef<DirectionProps>;
};