Socket
Socket
Sign inDemoInstall

react-fast-marquee

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-fast-marquee - npm Package Compare versions

Comparing version 1.5.1 to 1.5.2

2

dist/components/Marquee.d.ts

@@ -19,3 +19,3 @@ import { ReactNode, CSSProperties, FC, RefAttributes } from "react";

* @type {boolean}
* @default true
* @default false
*/

@@ -22,0 +22,0 @@ autoFill?: boolean;

@@ -25,3 +25,3 @@ "use client"

const Marquee = React.forwardRef(function Marquee({ style = {}, className = "", autoFill = true, play = true, pauseOnHover = false, pauseOnClick = false, direction = "left", speed = 50, delay = 0, loop = 0, gradient = false, gradientColor = [255, 255, 255], gradientWidth = 200, onFinish, onCycleComplete, children, }, ref) {
const Marquee = React.forwardRef(function Marquee({ style = {}, className = "", autoFill = false, play = true, pauseOnHover = false, pauseOnClick = false, direction = "left", speed = 50, delay = 0, loop = 0, gradient = false, gradientColor = [255, 255, 255], gradientWidth = 200, onFinish, onCycleComplete, children, }, ref) {
// React Hooks

@@ -28,0 +28,0 @@ const [containerWidth, setContainerWidth] = React.useState(0);

{
"name": "react-fast-marquee",
"version": "1.5.1",
"version": "1.5.2",
"description": "A lightweight React component that utilizes the power of CSS animations to create silky smooth marquees.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -72,19 +72,19 @@ # React Fast Marquee

| Property | Type | Default | Description |
| :---------------- | :-------------------------- | :---------------- | :------------------------------------------------------------------------------------------------------------------ |
| `style` | `CSSProperties` | `{}` | Inline style for the container div |
| `className` | `string` | `""` | Name of the css class to style the container div |
| `autoFill` | `boolean` | `true` | Whether to automatically fill blank space in the marquee with copies of the children or not |
| `play` | `boolean` | `true` | Whether to play or pause the marquee |
| `pauseOnHover` | `boolean` | `false` | Whether to pause the marquee when hovered |
| `pauseOnClick` | `boolean` | `false` | Whether to pause the marquee when clicked |
| `direction` | `"left" \| "right"\| "up"\| "down"` | `"left"` | The direction the marquee slides <br /><br /> **Warning:** Vertical marquees are currently experimental and may be buggy. Please swap the values of the marquee's height and width when setting them |
| `speed` | `number` | `50` | Speed calculated as pixels/second |
| `delay` | `number` | `0` | Duration to delay the animation after render, in seconds |
| `loop` | `number` | `0` | The number of times the marquee should loop, 0 is equivalent to infinite |
| `gradient` | `boolean` | `false` | Whether to show the gradient or not |
| `gradientColor` | `Array<number>` of length 3 | `[255, 255, 255]` | The rgb color of the gradient as an array of length 3 |
| `gradientWidth` | `number \| string` | `200` | The width of the gradient on either side |
| `onFinish` | `{() => void}` | `null` | A callback for when the marquee finishes scrolling and stops. Only calls if loop is non-zero. |
| `onCycleComplete` | `{() => void}` | `null` | A callback for when the marquee finishes a loop. Does not call if maximum loops are reached (use onFinish instead). |
| `children` | `ReactNode` | `null` | The children rendered inside the marquee |
| Property | Type | Default | Description |
| :---------------- | :---------------------------------- | :---------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `style` | `CSSProperties` | `{}` | Inline style for the container div |
| `className` | `string` | `""` | Name of the css class to style the container div |
| `autoFill` | `boolean` | `false` | Whether to automatically fill blank space in the marquee with copies of the children or not |
| `play` | `boolean` | `true` | Whether to play or pause the marquee |
| `pauseOnHover` | `boolean` | `false` | Whether to pause the marquee when hovered |
| `pauseOnClick` | `boolean` | `false` | Whether to pause the marquee when clicked |
| `direction` | `"left" \| "right"\| "up"\| "down"` | `"left"` | The direction the marquee slides <br /><br /> **Warning:** Vertical marquees are currently experimental and may be buggy. Please swap the values of the marquee's height and width when setting them |
| `speed` | `number` | `50` | Speed calculated as pixels/second |
| `delay` | `number` | `0` | Duration to delay the animation after render, in seconds |
| `loop` | `number` | `0` | The number of times the marquee should loop, 0 is equivalent to infinite |
| `gradient` | `boolean` | `false` | Whether to show the gradient or not |
| `gradientColor` | `Array<number>` of length 3 | `[255, 255, 255]` | The rgb color of the gradient as an array of length 3 |
| `gradientWidth` | `number \| string` | `200` | The width of the gradient on either side |
| `onFinish` | `{() => void}` | `null` | A callback for when the marquee finishes scrolling and stops. Only calls if loop is non-zero. |
| `onCycleComplete` | `{() => void}` | `null` | A callback for when the marquee finishes a loop. Does not call if maximum loops are reached (use onFinish instead). |
| `children` | `ReactNode` | `null` | The children rendered inside the marquee |

Sorry, the diff of this file is not supported yet

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