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

lottie-loader-react-native-tester

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lottie-loader-react-native-tester

A React Native Loader Component which uses Airbnb's Lottie to render smooth and beautiful loading animations.

  • 1.1.5
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

lottie-loader-react-native


A React Native Loader Component which uses Airbnb's Lottie to render smooth and beautiful loading animations, without blocking the entire view.

     

Installation


npm i -S lottie-loader-react-native
React Native CLI

If you're using React Native CLI you will need to link lottie-react-native to your package. Click here for more information.

Expo

If you're using expo no extra step is required.

Usage


import React from "react";
import { StyleSheet, StyleProp, ViewStyle } from "react-native";
import { LottieLoader } from "lottie-loader-react-native";

interface LoadingProps {
  visible: boolean;
  animationStyle?: StyleProp<ViewStyle>;
}

export const Loading: React.FC<LoadingProps> = ({
  visible,
  animationStyle,
}) => {
  return (
    <LottieLoader
      visible={visible}
      source={require("./loader.json")}
      animationStyle={animationStyle}
      speed={1}
    />
  );
};

const styles = StyleSheet.create({
  lottie: { width: 100, height: 100 },
});

Lottie Loader files

You can find free lottie files for your loaders here.

Props

PropDescriptionDefault
sourceThe source of animation. Can be referenced as a local asset by a string, or remotely with an object with a uri property, or it can be an actual JS object of an animation, obtained (for example) with something like require('../path/to/animation.json').Lottie Object
visibleControls the visibility of the loader.false
styleThe style to be applied to the Lottie.-
speedThe speed the animation will progress.1
loopA boolean flag indicating whether or not the animation should loop.true

License

Licensed under the MIT.

Keywords

FAQs

Package last updated on 23 Jun 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