Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

1.1K
Views
Use SweetAlert or SweetAlert2

Can anyone advise on which sweetalert library I should use and why?

I'm writing up a node.js web-app and upon doing some research on which fancy alert libraries I can use, I came across two of them that look the same: SweetAlert and SweetAlert2.

over 4 years ago · Santiago Trujillo
4 answers
Answer question

0

You should use SweetAlert2 as it's updated regularly.

From the creator of SweetAlert2:

The SweetAlert repo seems to be unmaintained. There's a bunch of Pull Requests without any replies, the last merged pull request was on Nov 9, 2014.

I created SweetAlert2 with HTML support in modal and some other options for customization modal window - width, padding, Esc button behavior, etc.

TLDR: The original SweetAlert hasn't been updated since Apr 29 2019, and has ignored many recent pull requests. The creator of the new SweetAlert2 stated they wanted to add some new features so that's why they created SweetAlerts2.

over 4 years ago · Santiago Trujillo Report

0

SweetAlert2 is simply a cleaner version. The functions are much easier to use and the documentation provides much more usability, when compared to it's first version.

As noted in the documentation, triggering the Swal in version 2 uses Swal.fire instead of Swal

Swal.fire(
  'Good job!',
  'You clicked the button!',
  'success'
)

Otherwise, there are many other customised ways to style each alert: https://sweetalert2.github.io/

over 4 years ago · Santiago Trujillo Report

0

Upon going through the sweetalert upgrade logs, it is recommended to use sweetalert2 because of its easy to use, flexible, awesome new changes.

You can have a read from this link: sweetalert upgrade logs

over 4 years ago · Santiago Trujillo Report

0

Go ahead and use SweetAlert2.

It comes with alot of functionalities and is regularly updated.

It looks like the initial SweetAlert library has not been updated for some time now. Their NPM package shows that it was last published 3 years ago.

Also check out this answer for more info: answer

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!