npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

react-native-sweet-alert

v4.2.0

Published

React Native wrapper for SweetAlert-style dialogs (iOS & Android)

Readme

react-native-sweet-alert

Cute, native alert dialogs for React Native - success, error, warning, normal, and progress styles, built on the New Architecture (TurboModules).

Sweet Alert demo

npm version Monthly downloads Architecture TypeScript License: MIT iOS Android


Features

  • 🎨 Five alert styles - success, error, warning, normal, progress
  • 📊 Progress style - determinate (with a setProgress() ticker) or indeterminate spinner
  • 🧵 Promise-based API - await showAlert(options) resolves { confirmed: boolean }
  • 👆 Cancellable - optional tap-outside-to-dismiss on any style
  • 🖌️ Themeable buttons and colors - per-alert hex colors for confirm/other buttons and the progress bar
  • 🌓 Dark mode aware - card background and text adapt automatically on both platforms
  • 🧩 New Architecture (TurboModules) - a Codegen spec, no legacy bridge fallback
  • 🔒 Fully typed - written in TypeScript, no @types package needed

Requirements

  • React Native 0.86+ with the New Architecture (the only architecture RN itself supports as of 0.82 - there's no legacy-bridge fallback here).
  • iOS 15+, Android API 24+.

Installation

npm install react-native-sweet-alert

Autolinking handles the rest - no manual bridging headers, no AndroidManifest.xml edits.

Usage

import SweetAlert from 'react-native-sweet-alert';

const result = await SweetAlert.showAlert({
  style: 'success',
  title: 'Great job!',
  subTitle: 'Everything went smoothly.',
  confirmButtonTitle: 'OK',
});

// result.confirmed is `true`/`false` depending on which button was pressed.

Alert styles

style is one of 'success' | 'error' | 'warning' | 'normal' | 'progress'.

await showAlert({
  style: 'warning',
  title: 'Are you sure?',
  subTitle: "This can't be undone.",
  confirmButtonTitle: 'Delete',
  confirmButtonColor: '#F27474',
  otherButtonTitle: 'Cancel',
  otherButtonColor: '#8CC152',
});

Set cancellable: true to let the user dismiss the alert by tapping outside it (resolves with { confirmed: false }).

Progress style

await showAlert({
  style: 'progress',
  title: 'Uploading...',
  progress: 0, // omit for an indeterminate spinner
  progressBarColor: '#4A90D9',
  progressCircleRadius: 36,
  progressBarWidth: 6,
});

setProgress(50); // update the same alert's progress later
dismissAlert(); // dismiss it programmatically when done

Full options reference

| Option | Type | Notes | | ---------------------- | --------- | --------------------------------------------------------- | | style | string | Required. success/error/warning/normal/progress | | title | string | | | subTitle | string | | | confirmButtonTitle | string | | | confirmButtonColor | string | Hex color, e.g. #4A90D9 | | otherButtonTitle | string | Omit to show a single-button alert | | otherButtonColor | string | Hex color | | cancellable | boolean | Tap outside to dismiss | | progress | number | 0-100; progress style only. Omit for indeterminate | | progressBarColor | string | progress style only | | progressCircleRadius | number | progress style only, in dp/pt | | progressBarWidth | number | progress style only, in dp/pt |

Example app

See example/ for a runnable Expo app exercising every alert style. From the repo root:

pnpm install
pnpm example ios     # or: pnpm example android

Contributing

License

MIT


Made with create-react-native-library