
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
dropper.mood
Advanced tools
The best Vue.js dropdown.
Dropper.mood is an intelligent dropdown component designed with Vue.js. It can be integrated into any Vue.js project and with several options and functionalities.
d24202057dc3b5744ae337d92822954f934f7765
# npm
npm i --save dropper.mood
# yarn
yarn add dropper.mood
Dropper.mood is very simple to use.
import Vue from 'vue';
import Dropper from 'dropper.mood';
import 'dropper.mood/dist/dropper.css';
// You can change the name of the component if you wish
Vue.use(Dropper, { name: 'Dropper' } );
<script lang="js">
import { Dropper } from "dropper.mood";
import 'dropper.mood/dist/dropper.css';
export default {
components: {
Dropper
}
}
</script>
After that you can use the component in your code as follows.
<template>
<div id="app">
<div id="join-element-id">
join element
</div>
<dropper join="#join-element-id" style="max-width: 250px">
<!-- Your code hear -->
</dropper>
</div>
</template>
It is a valid html selector as an id, a class or any other properties allowing to select the element attached to the dropdown. The dropdown position will be calculated based on the position of the join element.
This property defines the dropdown alignment. The latter can be placed on the left, right, top or bottom. If it is not, the alignment will be calculated automatically with respect to the direction property.
This property defines the alignment direction of the dropdown. If its value is x, the dropdown will align either to the left or to the right of the join element. If its value is y, the dropdown will be aligned either at the top or at the bottom of the join element. The default value is y. If the align property is defined, the direction property is not taken into account to calculate the position of the dropdown.
This property allows you to display or hide the arrow.
If true, the dropdown will be placed in the middle of the join element. This property is only taken into account if the display screen allows centered alignment.
this property defines the events of the join element which will trigger the opening of the dropdown. It can be a string if it is a single event or an array of string if it is several. The default value is click.
this property defines the events of the join element which will trigger the closure of the dropdown. It can be a string if it is a single event or an array of string if it is several.
Choose a large value so that the dropdown is not hidden by other dropdowns.
If true, the position of the dropdown will be calculated each time the size of the window is modified.
If true, the position of the dropdown will be calculated with each scroll of the window.
The event is triggered each time the dropdown opens.
The event is triggered each time the dropdown closes.
type: string value: left | right | top | bottom
Returns the position of the dropdown relative to the join element after opening. The values that can be sent are: left, right, top, bottom.
type: string value: left | right | top | bottom
Returns the position of the arrow relative to the dropdown join after opening. The values that can be sent are: left, right, top, bottom.
type: string value: left | right | top | bottom | middle
Returns the position of the arrow relative to the dropdown join after opening.
type: boolean value: true | false
Returns true if the dropdown is positioned in the middle of the join element, and false otherwise.
Triggers when the escape button is pressed while the dropdown is open.
Fires when a zone other than the dropdown receives a click while the dropdown is open.
You can access certain dropdown functions such as open and close. These two functions will respectively allow you to open and close the dropdown. Here is an example of using the functions.
<template>
<div id="app">
<div id="id-join-element" @click="openDropper">
My join element
</div>
<dropper
join="#id-join-element"
ref="dropper"
@esc-keydown="closeDropper"
@other-area-clicked="closeDropper"
class="my-super-dropdown"
style="width: 250px; background-color: yellow; color: black; border-radius: .3em;"
>
<!-- Your code hear -->
</dropper>
<button @click="openDropper">
open dropdown
</button>
</div>
</template>
<script>
import Vue from 'vue';
export default {
// ...
methods: {
methods: {
openDropper() {
const dropper = this.$refs.dropper;
dropper.open();
}
closeDropper() {
const dropper = this.$refs.dropper;
dropper.close();
}
}
}
}
</script>
FAQs
The best Vue.js droppdwon component.
The npm package dropper.mood receives a total of 17 weekly downloads. As such, dropper.mood popularity was classified as not popular.
We found that dropper.mood 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.