DEV Community

Dilip Suthar
Dilip Suthar

Posted on

2 2

react-native-tasty-toast


react-native-tasty-toast

🍞 Make your native android Toasts Tasty

Support us with a star 🌟






This library is a wrapper around native TastyToast Android library

📖 Getting started

$ npm install react-native-tasty-toast --save

$ yarn add react-native-tasty-toast

Linking (Mostly automatic installation)

ReactNative < 0.60

$ react-native link react-native-tasty-toast

💻 Usage

Only for Android

import TastyToast from 'react-native-tasty-toast';
TastyToast.show({
    message: 'My Toast',
    length: TastyToast.LENGTH_LONG,
    type: TastyToast.SUCCESS,
});
TastyToast.cancel();

💡 Props

Key Type Default Description
message string required The message to display
length number TastyToast.LENGTH_SHORT How long to display message
type number TastyToast.DEFAULT Type of the toast you want to display

Where length is:

  1. TastyToast.LENGTH_SHORT
  2. TastyToast.LENGTH_LONG

Where type is:

  1. TastyToast.DEFAULT
  2. TastyToast.SUCCESS
  3. TastyToast.WARNING
  4. TastyToast.ERROR
  5. TastyToast.INFO
  6. TastyToast.CONFUSING

✨ Credits

💫 Where is this library used?

If you are using this library in one of your projects, add it in this list below. ✨

💪 Support Development

There are few ways you can do it:

  • Starring and sharing the projects you like 🚀
  • Please follow dilipsuthar97 on GitHub.

Buy Me A Coffee ☕

Thanks! ❤️


dilipsuthar97.github.io

📱 Social

Twitter
GitHub

📜 License

Copyright 2020 Dilip Suthar (dilipsuthar97)

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Sentry mobile image

Tired of users complaining about slow app loading and janky UI?

Improve performance with key strategies like TTID/TTFD & app start analysis.

Read the blog post

Top comments (0)

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

👋 Kindness is contagious

Explore a sea of insights with this enlightening post, highly esteemed within the nurturing DEV Community. Coders of all stripes are invited to participate and contribute to our shared knowledge.

Expressing gratitude with a simple "thank you" can make a big impact. Leave your thanks in the comments!

On DEV, exchanging ideas smooths our way and strengthens our community bonds. Found this useful? A quick note of thanks to the author can mean a lot.

Okay