Skip to content

A marquee component created to simulate the deprecated <marquee> tag using requestAnimationFrame

License

Notifications You must be signed in to change notification settings

Jeevan-Kishore/react-raf-marquee

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

react-raf-marquee

A simple marquee component created to simulate the deprecated <marquee> tag using requestAnimationFrame (RAF)

Preface

An illusion of an infinite scroll is the tricky part, a set of duplicate set of data is used to accomplish the same within the code.

Important notes

  • The component takes the width of it's parent, it's wise to have a wrapper around the component, useful for styling

  • Scrolling is paused if the children elements is less than that of it's parent's width

  • Chidren elements can be any HTML element, tested with text and links for now

  • Events are bubbled up

PROPS

prop type functionality required defaults to
loopData array data for the marquee yes []
direction string direction of animation no landscape
verticalItemHeight number height of component on vertical animation yes 0

About

A marquee component created to simulate the deprecated <marquee> tag using requestAnimationFrame

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published