0.0.1 • Published 7 years ago

dotnav v0.0.1

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

Dotnav

React component with dots and arrows, designed to navigate any of the sliders and galleries.

Usage

<Dotnav
  index={index}
  count={count}
  withArrows
/>

Styles

If you use CSS Modules you can import styles and pass them as property:

import classes from 'dotnav/lib/Dotnav.css';

<Dotnav
  index={index}
  count={count}
  withArrows
  classes={classes}
/>

Or you can concat static styles from the package: 'dotnav/lib/styles.css'

Demo

Installation

npm install dotnav

Properties

PropertyRequiredTypeDefault ValueAvailable ValuesDescription
indextruenumber0From 0 to count - 1Current active dot
counttruenumber0Any numberThe number of points
withArrowsfalseboolfalsetrue, falseWhether arrows are visible or not
handleChangetruefuncCallback
classesfalseshape{ root: 'dotnav', dots: 'dotnav-dots', dot: 'dotnav-dot', dotActive: 'dotnav-dot Dotnav-dot_active', arrowPrev: 'dotnav-arrow Dotnav-arrow_prev', arrowNext: 'dotnav-arrow Dotnav-arrow_next' }Classnames for elements

Idea

Dotnav specially crafted for Animakit. See https://animakit.github.io for more details.