
Research
/Security News
Weaponizing Discord for Command and Control Across npm, PyPI, and RubyGems.org
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
@vuesimple/vs-toast
Advanced tools
A light weight vue plugin built groundup.
Code Sandbox: Link
npm i @vuesimple/vs-toast
<script>
import VsToast from '@vuesimple/vs-toast';
export default {
methods: {
showToast() {
VsToast.show({
title: 'Success Title',
message: 'Success message',
variant: 'success',
});
},
},
};
</script>
<script src="https://unpkg.com/@vuesimple/vs-toast@<version>/dist/vs-toast.min.js"></script>
<script>
export default {
methods: {
showToast() {
VsToast.show({
title: 'Success Title',
message: 'Success message',
variant: 'success',
});
},
},
};
</script>
Nuxt Code Snippet
After installation,
Create a file /plugins/vs-toast.js
import Vue from 'vue';
import VsToast from '@vuesimple/vs-toast';
Vue.component('vs-toast', VsToast);
Update nuxt.config.js
module.exports = {
...
plugins: [
{ src: '~plugins/vs-toast', mode: 'client' }
...
]
}
In the page/ component
<script>
export default {
methods: {
showToast() {
VsToast.show({
title: 'Success Title',
message: 'Success message',
variant: 'success',
});
},
},
};
</script>
Note
<no-ssr>...</no-ssr>
tag.import VsToast from '@vuesimple/vs-toast'
& add in component:{VsToast}
and use it within component, without globally installing in plugin folder.Name | Type | Default | Description |
---|---|---|---|
variant | String | - | Available variants; success , warning , error , info , secondary |
title | String | - | Toast title |
message | String | - | Toast body/content/description |
position | String | top-center | Available positions: top-left , top-center , top-right , bottom-left , bottom-center , bottom-right |
timeout | Number | 5000 | Hide timeout |
showClose | Boolean | false | Show/Hide close button |
type | String | toast | Available types: toast , alert |
animation | String | slide | Default class applied for animation: vs-toast--transition-{animation-name} |
isSticky | Boolean | false | Whether toast should close automatically or not |
You can also directly call success, warning & error functions as below:
VsToast.success('Success Message');
// Or
VsToast.error('Error Message');
// Or
VsToast.warning('Warning Message');
FAQs
A simple vue toast.
We found that @vuesimple/vs-toast demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
/Security News
Socket researchers uncover how threat actors weaponize Discord across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.
Security News
Socket now integrates with Bun 1.3’s Security Scanner API to block risky packages at install time and enforce your organization’s policies in local dev and CI.
Research
The Socket Threat Research Team is tracking weekly intrusions into the npm registry that follow a repeatable adversarial playbook used by North Korean state-sponsored actors.