@egstad/marquee
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

@egstad/marquee

A straight-forward Marquee

Install

npm install @egstad/marquee

Usage

Markup

<div class="marquee">
  <!-- Can be any html element you wish -->
  <p>Hello World</p>
</div>

<!-- Use the speed dataset to speed it up -->
<div class="marquee" data-speed="5">
  <p>Hello World</p>
</div>

Javascript

// import
import Marquee from '@egstad/marquee'

// init with class
const marquee = new Marquee('.className')

// init with element
const element = document.querySelector('.marquee')
const marquee = new Marquee(element)

Methods

// create instance
const marquee = new Marquee('.className')

// pause animation
marquee.stop()

// start over
marquee.reset()

// destroy events
marquee.destroy()

Readme

Keywords

Package Sidebar

Install

npm i @egstad/marquee

Weekly Downloads

80

Version

3.0.2

License

MIT

Unpacked Size

6.85 kB

Total Files

8

Last publish

Collaborators

  • egstad