
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
svelte-alerter-component
Advanced tools
Easily add custom alerts to your svelte app
Add it to your svelte project:
$ npm i svelte-alerter-component --save
Then, pop it into the component that suites you:
<script>
import AlerterComponent from 'svelte-alerter-component/component.svelte'; // In some cases you may need the pre compiled svelte: svelte-alerter-component/component
</script>
<Alerter/>
Then, from any page or component you need to, create a new alert:
import Alerter from 'svelte-alerter-component';
new Alerter({
title: "Like this alert?" // or a svelte component instance
style: "background: green; border-radius: 1px;" // Optional. You can also style alerts with this css selector: .svelte-alerter-component.alert
time: 3000 // Alert will disapear in 3 seconds. If no value is specified, the alert will not disapear automaticly
undo: () => {console.log("Undone!")} // If a value is specified, an undo button will apear on the alert. You can style this button with .svelte-alerter-component.undo
}, () => {
console.log("Alert has been removed!")
})
// or
let myAlert = new Alerter({
title: "My Alert"
})
myAlert.show(); // Show the alert
myAlert.hide(); // Hide the alert
myAlert.remove(); // Remove the alert
Never be afraid to ask: emooring@protonmail.com or Vehmloewff#0724
Found an problem? Submit an issue or ping me on Discord: Vehmloewff#0724.
FAQs
Easily add custom alerts to your svelte app
We found that svelte-alerter-component demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.