Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

circlr

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

circlr

Animation rotation via scroll, mouse and touch events

  • 3.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
351
decreased by-11.59%
Maintainers
1
Weekly downloads
 
Created
Source

circlr

Animation rotation via scroll, mouse and touch events

  • Horizontal or vertical orientation
  • Touch events support
  • Scroll support
  • Reverse and cyclic rotation

Install

npm install --save circlr

Usage

import circlr from 'circlr';

const el = document.querySelector('.container');

circlr(el)
  .scroll(true)
  .play()
  .on('show', n => {

  });

API

circlr(el)

Create rotation instance.

el

Type: string, element

Element.

.scroll(n)

n

Type: boolean

Rotation via scroll flag.

.vertical(n)

n

Type: boolean

Vertical orientation flag.

.reverse(n)

n

Type: boolean

Reverse rotation flag.

.cycle(n)

n

Type: boolean

Cyclic rotation flag, default true.

.start(n)

n

Type: number

Start frame, default 0.

.interval(ms)

n

Type: number

Playback interval, default 75 ms.

.play([n])

Start sequence playback.

n

Type: number

Frame number for playback to him or infinity playback if number in not specified.

.stop()

Stop playback.

.show(n)

Show specified frame.

n

Type: number

Frame number.

.prev()

Show previous frame.

.next()

Show next frame.

.unbind()

Unbind rotation events.

Events

  • show, when frame is showed

Support

  • Internet Explorer 9+
  • Chrome
  • Safari
  • Firefox
  • Opera
  • react-rotation - react rotation component

License

MIT

Keywords

FAQs

Package last updated on 18 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc