Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@kouts/vue-simple-dropdown
Advanced tools
A Vue.js 3 simple dropdown menu component for floating-vue.
vue-simple-dropdown is build on top of floating-vue to provide keyboard navigation for simple dropdown menus.
space
and enter
key when the dropdown trigger has focusEsc
keynpm i @kouts/vue-simple-dropdown
<script setup lang="ts">
import SimpleDropdown from '@kouts/vue-simple-dropdown'
</script>
<template>
<SimpleDropdown class="inline" popper-class="w-64 bg-white border rounded-lg shadow-md">
<!-- Dropdown trigger -->
<button
class="dropdown-trigger inline-block px-6 py-3 bg-blue-600 text-white leading-tight rounded hover:bg-blue-700 focus:bg-blue-700 focus:outline-none focus:ring-0 active:bg-blue-800 transition duration-150 ease-in-out"
>
Dropdown button
</button>
<!-- Dropdown content -->
<template #popper="{ hide }">
<ul class="py-1 text-sm text-gray-70">
<li>
<a href="#" class="block py-2 px-4 hover:bg-gray-100 focus:bg-gray-100 outline-none" @click="hide">
Action (closes dropdown)
</a>
</li>
<li>
<a href="#" class="block py-2 px-4 hover:bg-gray-100 focus:bg-gray-100 outline-none">Another action</a>
</li>
</ul>
</template>
</SimpleDropdown>
</template>
vue-simple-dropdown
does not include any styling. You can use vanilla CSS or your favorite CSS framework to style it.
By default it sets the floating-vue
Dropdown
theme to simple-dropdown
and hides the dropdown arrow
.
The Dropdown
arrow can be enabled by passing a different theme
prop
, e.g theme="my-theme"
.
vue-simple-dropdown
inherits all props
from floating-vue Dropdown
and sets some defaults:
distance: 14
triggers: ['click']
theme: "simple-dropdown"
placement: "bottom-start"
autoHide: true
It also adds some props
on top:
Name | Type | Description | Default |
---|---|---|---|
enableArrowNavigation | boolean | Enables/disables the arrow navigation feature | true |
itemSelector | string | The dropdown item selector for the arrow navigation | li > a:not(.disabled):not(:disabled) |
vue-simple-dropdown
inherits all slots
from floating-vue Dropdown
vue-simple-dropdown
inherits all events
from floating-vue Dropdown
In order to start development:
npm i
npm run dev
FAQs
A Vue.js 3 simple dropdown component.
The npm package @kouts/vue-simple-dropdown receives a total of 1 weekly downloads. As such, @kouts/vue-simple-dropdown popularity was classified as not popular.
We found that @kouts/vue-simple-dropdown 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.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.