@itwin/itwinui-react
Version:
A react component library for iTwinUI
34 lines (33 loc) • 1.26 kB
TypeScript
import type { PolymorphicForwardRefComponent } from '../../utils/index.js';
type CarouselDotsListProps = {
/** Number of total dots/slides in the carousel. Will be inferred from Carousel context or children. Otherwise, it is required to be passed. */
length?: number;
/** Index of currently active dot. Will be inferred from Carousel context, or else default to 0. */
currentIndex?: number;
/** Callback fired when any of the dots are clicked. */
onSlideChange?: (index: number) => void;
};
/**
* The `CarouselDotsList` component shows a list of `CarouselDot` components which can be used to
* choose a specific slide. If used as a descendant of `Carousel`, then this component does not need
* any props or `children`.
*
* The props can be specified if this component is being used outside `Carousel`. `children` can be specified
* to override the individual dots that are shown.
*
* @example
* <Carousel>
* // ...
* <Carousel.DotsList />
* </Carousel>
*
* @example
* <Carousel.DotsList
* length={10}
* maxCount={3}
* currentIndex={current}
* onSlideChange={(i) => setCurrent(i)}
* />
*/
export declare const CarouselDotsList: PolymorphicForwardRefComponent<"div", CarouselDotsListProps>;
export {};