Socket
Socket
Sign inDemoInstall

@baronha/ting

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@baronha/ting

test


Version published
Weekly downloads
259
decreased by-1.52%
Maintainers
1
Weekly downloads
 
Created
Source

LogoReact-Native BuyMeACoffee Kofi

Overview

Turbo Native Modules Swift Kotlin

🍞 Flexible and customizable React toast notifications with support for positioning, custom rendering, click handlers, and duration control.

Installation

yarn add @baronha/ting
or
npm i @baronha/ting

iOS

New Architecture
cd ios && RCT_NEW_ARCH_ENABLED=1 bundle exec pod install --verbose
Older
cd ios && pod install --verbose

Usage

Toast

import { toast } from '@baronha/ting';
// ...
const options = {
  title: 'Done 😎',
  message: 'Successful!!',
};

toast(options); // easy to use
Customize Icon
import { toast } from '@baronha/ting';
// ...
const options = {
  // ...
  titleColor: '#D60A2E',
  icon: {
    uri: require('./vietnam.png'), // or remote
    size: 24,
  },
};

toast(options); // icon is 🇻🇳

Alert

import { alert } from '@baronha/ting';
// ...
const options = {
  title: 'Done 😎',
  message: 'Successful!!',
};

alert(options); // easy to use

Options

PropertyTypeDefault valuePlatformToastAlertDescription
titlestringnullBoth
subTitlestringnullBoth
titleColorstringnullBoth
messageColorstringnullBoth
iconobjectnullBothSee Icon
presetstringdoneBothToast: done, error, none.
Alert: done, error, none, spinner
durationnumber3BothThe lifetime of the toast (seconds)
titleColorstringnullBoth
shouldDismissByDragbooleantrueBothThe behavior on Android is click
positionstringtopBothToast is displayed from top or bottom
hapticstringnulliOSsuccess, warning, error, none
shouldDismissByTapbooleantrueBoth
borderRadiusnumbernullBoth
blurBackdropnumbernullAndroid
backdropOpacitynumbernullAndroid

Icon

iconTypeDefault valuePlatform
uristringnullBoth
sizenumbernullBoth

To Do

  • shouldDismissByDrag on Android
  • callback

Performance

We're trying to improve performance. If you have a better solution, please open a issue or pull request. Best regards!

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT AlertKit SPIndicator EasyWindow

Keywords

FAQs

Package last updated on 09 Jul 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