
Product
Introducing Socket Fix for Safe, Automated Dependency Upgrades
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
react-double-marquee
Advanced tools
A React marquee component that smoothly loops content.
Lo-fi demo:
View the demos page for live examples.
Demos can be found here.
Install as a dependency:
$ npm install --save react-double-marquee
Then, import it and wrap it in an element that does not display overflow:
import Marquee from 'react-double-marquee';
export default function FooComponent() {
return (
<div
style={{
width: '200px',
whiteSpace: 'nowrap',
}}
>
<Marquee>
Some really really really really really long text
</Marquee>
</div>
);
}
Key | Type | Default | Description |
---|---|---|---|
speed | Number | 0.04 | Movement speed, in pixels/millisecond. |
delay | Number | 3000 | Time until animation begins, in milliseconds. |
direction | "right"||"left" | "right" | Horizontal direction. |
childMargin | Number | 10 | Horizontal margin between children, in pixels. |
children | React node | None | Children to render within the marquee. |
scrollWhen | "overflow"||"always" | "always" | Whether the text always scrolls, or only when the content overflows the container width. |
First, clone the repository.
Install dependencies:
$ npm install
To build the package bundle:
$ npm run build
To build the bundle with live rebuilding:
$ npm run watch
To run the demos with live reload:
$ npm run dev
Then, open http://localhost:8001
to view the demo docs.
To build the static docs website (e.g. for GitHub Pages):
$ npm run docs
To run tests:
$ npm run test
To run tests in watch mode:
$ npm run test:watch
To run tests with coverage reporting:
$ npm run test:coverage
To run the linter:
$ npm run lint
Releases are done automatically via Travis CI and semantic-release
from the master
branch.
To verify the repos for release:
$ npm run release:verify
To run the release script as a dry-run:
$ npm run release
MIT
FAQs
A smooth-scrolling React <marquee> component that loops content.
The npm package react-double-marquee receives a total of 868 weekly downloads. As such, react-double-marquee popularity was classified as not popular.
We found that react-double-marquee demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Automatically fix and test dependency updates with socket fix—a new CLI tool that turns CVE alerts into safe, automated upgrades.
Security News
CISA denies CVE funding issues amid backlash over a new CVE foundation formed by board members, raising concerns about transparency and program governance.
Product
We’re excited to announce a powerful new capability in Socket: historical data and enhanced analytics.