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

rn-simple-toast

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rn-simple-toast

React Native Toast component for both iOS and Android

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

rn-simple-toast

React Native Toast component for both iOS and Android

Add it to your project

  1. Insall package
    • Using NPM npm i -S rn-simple-toast
    • Using Yarn yarn add rn-simple-toast
  2. Import package import { Toast, DURATION, POSTION } from 'rn-simple-toast';

Usage

import React from 'react';
import { Toast, DURATION  } from 'rn-simple-toast';
class App extends React.Component  {
    render() {
        return (
            <View style={styles.container}>
                <Toast ref={_ref => this.toastRef = _ref} />
                <Button
                    onPress={() => {
                        toastRef.show('Some message here', '#3498db', DURATION.LONG);
                    }}
                    title='Show message'
                    style={{ width: 120, backgroundColor: 'darkviolet' }}
                    textColor='#fff'
                />
            </View>
        );
    }
}
DEMO

iOS Android

Props

  • duration (String) - Duration time to display message.
  • containerStyle (String) Style of toast container.
  • textStyle (Function) - Style of text message
  • position (String) - Message display position
  • positionOffset (String) - Distance from top or bottom to display message

Method

  • show - The method to show toast message

MIT Licensed

Keywords

FAQs

Package last updated on 28 Sep 2020

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