0.7.0 • Published 8 months ago

svelte-fast-marquee v0.7.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

Svelte Fast Marquee

A Marquee component for Svelte inspired by react-fast-marquee.

npm npm downloads npm license npm bundle size npm type definitions

demogif

Demo

Check out the demo here and play around with some sample marquees.

Installation

If you're using npm, in the command prompt run:

npm install svelte-fast-marquee --save

If you're using yarn, run:

yarn add svelte-fast-marquee

Usage

To use the component, first import Marquee into your file:

import Marquee from "svelte-fast-marquee";

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

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

A sample file might look like this:

<script>
    import MyComponent from '../components/MyComponent';
    import Marquee from 'svelte-fast-marquee';
</script>
<Marquee>
    <MyComponent />
    <MyComponent />
    <MyComponent />
</Marquee>

Props

PropertyTypeDefaultDescription
stylestring | The inline style for the container div.
classstring | The name of the css class to style the container div.
playbooleantrueWhether to play or pause the marquee
speednumber100The speed of the marquee in pixels per second
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
gradientbooleanfalseWhether to show a gradient on right and left
--gradientWidthstring"10%"The width of the gradient on either side.
--gradientColorstring"white"The color of the gradient
0.5.4

8 months ago

0.5.3

8 months ago

0.5.0

9 months ago

0.7.0

8 months ago

0.6.1

8 months ago

0.5.2

8 months ago

0.6.0

8 months ago

0.5.1

8 months ago

0.4.1

3 years ago

0.4.0

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.1

3 years ago

1.0.0

3 years ago