mistui-kit
Version:
**👉 [Try MistUi Live](https://gilded-tanuki-0eb52b.netlify.app/) — interactive playground & docs**
43 lines (42 loc) • 1.24 kB
TypeScript
import { Easing } from 'framer-motion';
import type { ButtonProps } from '../buttons/type';
export type SourceIremType = {
type: 'image' | 'video' | 'content';
src?: string | React.ReactElement;
style?: React.CSSProperties;
};
export type CarouselProps = {
editor?: boolean;
width?: number;
height?: number;
loop?: boolean;
autoplay?: boolean;
slidesToScroll?: number;
autoplayDelay?: number;
slidesToShow?: number;
items: SourceIremType[];
className?: React.HTMLAttributes<HTMLDivElement>['className'];
sizeButton?: 'auto' | 'xs' | 'sm' | 'md' | 'lg' | 'xl';
animation?: CarouselAnimation;
};
export type PromoSliderProps = {
editor?: React.ReactElement;
autoplay?: boolean;
autoplayDelay?: number;
onChange?: (active: number) => void;
items: {
title: string;
description: string;
images: string[];
}[];
button?: ButtonProps;
className?: React.HTMLAttributes<HTMLDivElement>['className'];
style?: React.HTMLAttributes<HTMLDivElement>['style'];
};
export type CarouselAnimation = {
type?: 'slide' | 'fade' | 'zoom';
duration?: number;
ease?: Easing | Easing[];
stiffness?: number;
damping?: number;
};