@sweetalert2/themes

js Styles
Themes for SweetAlert2
Version 5.0.27 License MIT
Keywords
sweetalert2themethemesthemingsass
INSTALL
Type:
Version:
- Static
- Latest Patch
- Latest Minor
- Latest Major
- 5.0.27
- 5.0.26
- 5.0.25
- 5.0.24
- 5.0.23
- 5.0.22
- 5.0.21
- 5.0.20
- 5.0.19
- 5.0.18
- 5.0.17
- 5.0.16
- 5.0.15
- 5.0.14
- 5.0.13
- 5.0.12
- 5.0.11
- 5.0.10
- 5.0.9
- 5.0.8
- 5.0.7
- 5.0.6
- 5.0.5
- 5.0.4
- 5.0.3
- 5.0.2
- 5.0.1
- 5.0.0
- 4.0.5
- 4.0.4
- 4.0.3
- 4.0.2
- 4.0.1
- 4.0.0
- 3.2.0
- 3.1.4
- 3.1.3
- 3.1.2
- 3.1.1
- 3.1.0
- 3.0.7
- 3.0.6
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.2.1
- 2.2.0
- 2.1.0
- 2.0.3
- 2.0.2
- 2.0.1
- 2.0.0
- 1.3.0
- 1.2.3
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.0
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 1.0.2
- 1.0.1
- 1.0.0
- 0.1.0
- 0.0.1
<script src=" https://cdn.jsdelivr.net/npm/@sweetalert2/themes@5.0.27/vite.config.min.js "></script>
<link href=" https://cdn.jsdelivr.net/npm/@sweetalert2/themes@5.0.27/bootstrap-4/bootstrap-4.min.css " rel="stylesheet">
No default files set by the package author so the URLs are guessed. You can always browse all package files to use other ones.
@sweetalert2/themes - Official Themes for SweetAlert2
Available themes
Installation
You can install all themes at once:
npm install --save @sweetalert2/themes
Or just a single theme @sweetalert2/theme-<theme_name>
, e.g.
npm install --save @sweetalert2/theme-dark
Or grab them both from jsdelivr CDN, for example:
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-dark@5/dark.css" />
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.js"></script>
Usage
With CSS:
<!-- Include a required theme -->
<link rel="stylesheet" href="@sweetalert2/themes/dark/dark.css" />
<script src="sweetalert2/dist/sweetalert2.min.js"></script>
With SASS:
your-app.js
:
import Swal from 'sweetalert2/dist/sweetalert2.js';
your-app.scss
:
@import '@sweetalert2/themes/dark/dark.scss';
Contributing
If you would like to contribute enhancements or fixes, please do the following:
Fork the
sweetalert2-themes
repository and clone it locally.When in the
sweetalert2-themes
directory, runyarn install
to install dependencies.To begin active development, run
yarn start
andyarn watch
simultaneously.Or, if you want to quickly start a new theme, run
yarn create-new-theme my-awesome-theme
. This will create the theme's default files.
Donations
Has SweetAlert2 helped you create an amazing application? You can show your support by making a donation: