Skip to content

yilinjuang/material-ui-dots

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Material-UI Dots

npm Package Build Status Coverage Status Standard - JavaScript Style Guide

This component gives you animated pagination dots as seen in the Material Design specs and in the quick settings menu of Android N. The dots were extracted from our auto-rotating carousel component.

Installation

npm i --save material-ui-dots

Usage

There is only a single Dots component which is to be used in controlled mode. The following example component will display five dots and select a dot when clicking on it.

import React from 'react'
import Dots from 'material-ui-dots'

class Demo extends React.Component {
  constructor (props) {
    super(props)
    this.state = { index: 0 }
  }

  render () {
    return (
      <Dots
        index={this.state.index}
        count={5}
        onDotClick={(index) => this.setState({ index })}
      />
    )
  }
}

License

The files included in this repository are licensed under the MIT license.

About

Just some animated dots for pagination.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%