PaginationDot
Dot indicators for carousels or steps.
Preview
Usage
"use client";
import { useState } from 'react';
import { PaginationDot } from '@photonix/ultimate';
export default function PaginationDotBasicExample() {
const [activeIndex, setActiveIndex] = useState(2);
return (
<PaginationDot
count={7}
activeIndex={activeIndex}
onDotClick={setActiveIndex}
variant="dynamic"
size={8}
/>
);
}Component API
PaginationDot
Prop | Type | Default | Description |
|---|---|---|---|
count | number | - | Total number of dots (pages). |
activeIndex | number | - | Current active index (0-based). |
onDotClick | ((index: number) => void) | - | Callback when a dot is clicked. |
variant | "static" | "dynamic" | 'static' | Visual variant. 'static' for uniform dots, 'dynamic' for scaling dots. |
className | string | - | Custom class name. |
style | React.CSSProperties | - | Custom styles. |
size | number | - | Size of the dots in px (default is defined in CSS, usually 8px). |
On this page
Preview
Component API