This package provides an animated pagination dot component for React Native applications, designed to visually indicate the current page in a scrollable view or carousel with a distinct moving animation. It primarily offers a simple, customizable solution for pagination with smooth transitions between active dots. The current stable version is 0.4.0, last updated in September 2022. While development activity has been infrequent since its last major update, the library is stable and functional for its intended purpose. It differentiates itself from static pagination components through its built-in dot animation logic.
npm install react-native-animated-pagination-dotVerified import paths — ran on the pinned version, not inferred.
Demonstrates a basic implementation of `PaginationDot` in a React Native component. It shows how to import the component, set required props like `curPage` and `maxPage`, and customize colors. A `useState` hook manages the current page index, which automatically cycles for illustrative purposes.
Migrate to using the `sizeRatio` prop to control the size of the dots. `sizeRatio` customizes the dot size, with a minimum value of 1.0 (recommended range 1.0 ~ 2.0).
Thoroughly test the component across target React Native versions. Consider contributing to the project or forking it if specific compatibility fixes or new features are required for modern RN environments.
Ensure both `curPage` (current page index) and `maxPage` (total number of pages) are passed as `number` props to `PaginationDot`. For example: `<PaginationDot curPage={0} maxPage={5} />`.Replace `containerWidth` with the `sizeRatio` prop. For instance, instead of `containerWidth={10}`, use `sizeRatio={1.5}` to adjust dot size. The default `sizeRatio` is 1.0.