Socket
Socket
Sign inDemoInstall

@stockfit/react-native-marquee-any

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @stockfit/react-native-marquee-any

A pure JavaScript marquee component for react native. This package is inspired by react-native-marquee. Instead of limiting the children to text, it can animate any component you like.


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-native-marquee-any

A pure JavaScript marquee component for react native. This package is inspired by react-native-marquee. Instead of limiting the children to text, it can animate any component you like.

To see a live demo of the package in action, click here: Expo Snack

Installation

npm install --save @stockfit/react-native-marquee-any
or
yarn add @stockfit/react-native-marquee-any

Usage

import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import { Marquee } from "@stockfit/react-native-marquee-any";

export default class MarqueeTextSample extends Component {
  render() {
    return (
      <View style={styles.container}>
        <Marquee
          style={{ fontSize: 24 }}
          duration={3000}
          marqueeOnStart
          loop
          marqueeDelay={1000}
          marqueeResetDelay={1000}
        >
          Lorem Ipsum is simply dummy text of the printing and typesetting industry and typesetting industry.
        </Marquee>
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
  },
});

Properties

PropTypeOptionalDefaultDescription
styleStyleObjtrue-text style
durationnumbertrue3000Number of milliseconds until animation finishes from start.
loopbooleantruefalseSet this true when animation repeats.
marqueeOnStartbooleantruefalseSet this true while waiting for new data from a refresh.
marqueeResetDelaynumbertrue0Number of milliseconds to wait before resetting the marquee position after it finishes.
marqueeDelaynumbertrue0Number of milliseconds to wait before starting or restarting marquee.
onMarqueeCompletefunctiontrue-Callback function for when the marquee completes its animation
useNativeDriverbooleantruefalseSet this truen if you want to use native driver
easingfunctiontrueinOutEasing function to define animation curve.

Methods

These methods are optional, you can use the isOpen property instead

PropParamsDescription
startAnimationdelayStart animation
stopAnimation-Stop animation

Contribution

Do you have any idea or want to change something? Just open an issue. Contributions are always welcome.

Lisence

MIT Lisence

FAQs

Last updated on 22 Feb 2022

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc