MCPcopy
hub / github.com/untitleduico/react / CarouselIndicator

Function CarouselIndicator

components/application/carousel/carousel.demo.tsx:7–33  ·  view source on GitHub ↗
({
    size = "md",
    isBrand,
    framed,
    className,
}: {
    size?: "md" | "lg";
    isBrand?: boolean;
    framed?: boolean;
    className?: string;
})

Source from the content-addressed store, hash-verified

5import { PaginationDot } from "@/components/application/pagination/pagination-dot";
6
7export const CarouselIndicator = ({
8 size = "md",
9 isBrand,
10 framed,
11 className,
12}: {
13 size?: "md" | "lg";
14 isBrand?: boolean;
15 framed?: boolean;
16 className?: string;
17}) => {
18 const { selectedIndex, scrollSnaps, api } = useCarousel();
19
20 return (
21 <PaginationDot
22 size={size}
23 framed={framed}
24 isBrand={isBrand}
25 page={selectedIndex + 1}
26 total={scrollSnaps.length}
27 className={className}
28 onPageChange={(page) => {
29 api?.scrollTo(page - 1);
30 }}
31 />
32 );
33};
34
35export const CarouselMd = () => {
36 return (

Callers

nothing calls this directly

Calls 1

useCarouselFunction · 0.90

Tested by

no test coverage detected