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

ember-fast-marquee

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

ember-fast-marquee

A lightweight Ember component that uses CSS animations to create silky smooth marquees.

  • 0.1.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by266.67%
Maintainers
1
Weekly downloads
 
Created
Source

Ember Fast Marquee

NPM CI Status License

Ember Fast Marquee is a lightweight ember component that utilizes the power of CSS animations to create silky smooth marquees.

Inspired by React Fast Marquee

demogif

Differences from React Fast Marquee

  • Automatically duplicates content as many times as necessary
  • Use @fillRow={{true}} to fill any left over white space if desired
  • 1 transform3d animation per marquee

Compatibility

  • Ember.js v3.24 or above
  • Embroider or ember-auto-import v2

Installation

ember install ember-fast-marquee

Usage

To use the component, first you need to import marquee.css into your application somehow.

If you are using embroider simply import the css into your application

// application.js
import "ember-fast-marquee/marquee.css";

Or import into your css as your would other third party CSS eg.

/* app.css */
@import "node_modules/ember-fast-marquee/marquee.css";

Then wrap the <Marquee> component around any component or text you'd like to slide.

<Marquee>
  I can be a component, multiple components, plain html or just some text.
</Marquee>

Full Example

All options with defaults

<Marquee
  @fillRow={{false}}
  @play={{true}}
  @pauseOnHover={{false}}
  @pauseOnClick={{false}}
  @direction="left"
  @speed={{20}}
  @delay={{0}}
  @loop={{0}}
  @gradient={{true}}
  @gradientColor="255,255,255"
  @gradientWidth="5%"
  @onFinish={{this.someAction}}
  @onCycleComplete={{this.anotherAction}}
  class="my-own-fancy-class"
>
  <div class="photo">
    <img src="https://i.pravatar.cc/150?img=3" />
  </div>

  <div class="photo">
    <img src="https://i.pravatar.cc/150?img=3" />
  </div>

  <div class="photo">
    <img src="https://i.pravatar.cc/150?img=3" />
  </div>
</Marquee>

Component Arguments

PropertyTypeDefaultDescription
fillRowbooleanfalseWhether to fill empty spaces with repeat content
playbooleantrueWhether to play or pause the marquee
pauseOnHoverbooleanfalseWhether to pause the marquee when hovered
pauseOnClickbooleanfalseWhether to pause the marquee when clicked
direction"left" or "right""left"The direction the marquee is sliding
speednumber20Speed calculated as pixels/second
delaynumber0Duration to delay the animation after render, in seconds
loopnumber0The number of times the marquee should loop, 0 is equivalent to infinite
gradientbooleanfalseWhether to show the gradient or not
gradientColorstring"255,255,255"The rgb color of the gradient as a string of RGB values separated by commas
gradientWidthnumber or string"5%"The width of the gradient on either side, if a number is passed % is used, if a string is passed it is used as is to allow other units to be used
onFinishFunctionundefinedA callback for when the marquee finishes scrolling and stops. Only calls if loop is non-zero.
onCycleCompleteFunctionundefinedA callback for when the marquee finishes a loop. Does not call if maximum loops are reached (use onFinish instead).

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.

Keywords

FAQs

Package last updated on 16 Jun 2022

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