Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-marquee

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-marquee

React Native Marquee Text Component

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
866
decreased by-10.54%
Maintainers
1
Weekly downloads
 
Created
Source

react-native-marquee

A pure JavaScript marquee text component for react native.

Installation

npm install --save react-native-marquee
or
yarn add react-native-marquee

Usage

import React, { Component } from 'react';
import { StyleSheet, View } from 'react-native';
import MarqueeText from 'react-native-marquee';

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

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

Properties

MarqueeText component basically inherits TextProps and the followings are additional ones:

PropTypeOptionalDefaultDescription
marqueeOnStartbooleantruetrueA flag whether to start marquee animation right after render
speednumbertrue1Speed calculated as pixels/second
loopbooleantruetrueA flag whether to loop marquee animation or not
delaynumbertrue0Duration to delay the animation after render, in milliseconds
onMarqueeCompletefunctiontruevoidA callback for when the marquee finishes animation and stops
consecutivebooleantruefalseA flag to enable consecutive mode that imitates the default behavior of HTML marquee element. Does not take effect if loop is false

Methods

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

PropParamsDescription
start-Start animation
stop-Stop animation

Contribution

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

Lisence

MIT Lisence

Keywords

FAQs

Package last updated on 06 Mar 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc