2.1.0 • Published 6 years ago

react-analog-clock v2.1.0

Weekly downloads
103
License
MIT
Repository
github
Last release
6 years ago

\<AnalogClock />

AnalogClock is a themable clock component. It provides an easy way of adding a clock to your application. The clock is fully responsive based on the width prop you pass in.

npm install --save react-analog-clock

Try out the DEMO

npm.io

Usage

import AnalogClock, { Themes } from 'react-analog-clock';

ReactDOM.render(<AnalogClock theme={Themes.dark} />, element);

Props

propdefault
width400px
themeThemes.dark
gmtOffset (optional)offset of new Date() (e.g. '-5.5')
showSmallTicks (optional)true

Themes

ThemeDescription
darkBlack base, black border
lightWhite base, gray border
aquaGray base, aqua border
limeGreen base, white border
sherbertGradient (green/pink) base, white border
navyGradient (blue) base, white border

Scripts

scriptdescription
npm startrun the demo on localhost:3000
npm testrun the test suite
npm run lintrun the linter

Patrons

Be the first to contribute! ✌⊂(✰‿✰)つ✌

Ideas for contribution

  • Allow % width values
  • Add Timezone (Winter/Summertime) Support
  • Update docs with how to write custom themes
  • Add hand movement animation

License

MIT