New: Introducing PHP and Composer Support.Read the Announcement
Socket
Book a DemoInstallSign in
Socket

@frankhoodbs/dropdown-cmp

Package Overview
Dependencies
Maintainers
4
Versions
55
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frankhoodbs/dropdown-cmp

Dropdown component

latest
npmnpm
Version
4.0.7
Version published
Maintainers
4
Created
Source

Dropdown Component

A flexible and accessible dropdown component tailored for Vue 3. This dropdown is designed for both visual appeal and usability, adhering to ARIA guidelines. The component is extensible, allowing for easy integration and customization of its design to match your project.

Version License

Props

Prop NameDefault ValueDescription
data-menu-items-required An array of items for the dropdown menu
data-id-required Prefix for all the id attributes
data-disabledfalseBoolean indicating if the dropdown is disabled
data-placement'bottom-start'Initial placement for the floating menu
data-fallback-placements-Array of alternative placements for the floating menu in case the desired placement is not possible
data-offset0Offset (in pixels) between the button and the floating menu

Slots

Slot NameDescriptionContext Props
buttonSlot for custom content of the dropdown buttonexpanded: Boolean indicating if the dropdown menu is expanded
menuitemSlot for custom content of each dropdown menuitemoption: The current option object from data-menu-items prop
index: The current index of the option in the data-menu-items array
attr: Object with predefined attributes for the menuitem

CSS Custom Properties

Custom PropertyDefault ValueDescription
--dropdown-width100%Width of the dropdown wrapper.
--dropdown-button-positionBackground color of the dropdown button.
--dropdown-button-widthWidth of the dropdown button.
--dropdown-button-paddingPadding of the dropdown button.
--dropdown-button-bg-colorBackground color of the dropdown button.
--dropdown-button-colorText color of the dropdown button.
--dropdown-button-border-widthWidth of the dropdown button border.
--dropdown-button-border-styleStyle of the dropdown button border.
--dropdown-button-border-colorColor of the dropdown button border.
--dropdown-button-border-radiusBorder radius of the dropdown button.
--dropdown-button-box-shadowBox shadow of the dropdown button.
--dropdown-button-opacityOpacity of the dropdown button.
--dropdown-button-z-indexZ-index of the dropdown button.
--dropdown-button-expanded-bg-colorBackground color for the expanded state of the dropdown button.
--dropdown-button-expanded-colorText color for the expanded state of the dropdown button.
--dropdown-button-expanded-border-widthWidth for the expanded state of the dropdown button border.
--dropdown-button-expanded-border-styleStyle for the expanded state of the dropdown button border.
--dropdown-button-expanded-border-colorColor for the expanded state of the dropdown button border.
--dropdown-button-expanded-box-shadowBox shadow for the expanded state of the dropdown button.
--dropdown-button-expanded-outlineOutline for the expanded state of the dropdown button.
--dropdown-button-expanded-outline-offsetOutline offset for the expanded state of the dropdown button.
--dropdown-button-disabled-bg-colorBackground color for the disabled state of the dropdown button.
--dropdown-button-disabled-colorText color for the disabled state of the dropdown button.
--dropdown-button-disabled-border-widthWidth for the disabled state of the dropdown button border.
--dropdown-button-disabled-border-styleStyle for the disabled state of the dropdown button border.
--dropdown-button-disabled-border-colorColor for the disabled state of the dropdown button border.
--dropdown-button-disabled-box-shadowBox shadow for the disabled state of the dropdown button.
--dropdown-button-disabled-opacity0.333Opacity for the disabled state of the dropdown button.
--dropdown-button-disabled-cursornot-allowedCursor for the disabled state of the dropdown button.
--dropdown-button-hover-bg-colorBackground color for the hover state of the dropdown button.
--dropdown-button-hover-colorText color for the hover state of the dropdown button.
--dropdown-button-hover-border-widthWidth for the hover state of the dropdown button border.
--dropdown-button-hover-border-styleStyle for the hover state of the dropdown button border.
--dropdown-button-hover-border-colorColor for the hover state of the dropdown button border.
--dropdown-button-hover-box-shadowBox shadow for the hover state of the dropdown button.
--dropdown-button-hover-opacityOpacity for the hover state of the dropdown button.
--dropdown-menu-width100%Width of the dropdown menu.
--dropdown-menu-max-widthMaximum width of the dropdown menu.
--dropdown-menu-min-widthMinimum width of the dropdown menu.
--dropdown-menu-max-heightMaximum height of the dropdown menu.
--dropdown-menu-paddingPadding of the dropdown menu.
--dropdown-menu-bg-colorwhiteBackground color of the dropdown menu.
--dropdown-menu-colorText color of the dropdown menu.
--dropdown-menu-border-width1pxWidth of the dropdown menu border.
--dropdown-menu-border-stylesolidStyle of the dropdown menu border.
--dropdown-menu-border-colorColor of the dropdown menu border.
--dropdown-menu-border-radius0.25remBorder radius of the dropdown menu.
--dropdown-menu-box-shadowBox shadow of the dropdown menu.
--dropdown-menu-z-index1Z-index of the dropdown menu.
--dropdown-menuitem-displayblockDisplay of the dropdown menuitems.
--dropdown-menuitem-width100%Width of the dropdown menuitems.
--dropdown-menuitem-paddingPadding of the dropdown menuitems.
--dropdown-menuitem-bg-colorBackground color of the dropdown menuitems.
--dropdown-menuitem-colorText color of the dropdown menuitems.
--dropdown-menuitem-text-decorationText decoration of the dropdown menuitems.
--dropdown-menuitem-text-underline-offsetText underline offset of the dropdown menuitems.
--dropdown-menuitem-hover-bg-colorBackground color for the hover state of the dropdown menuitems.
--dropdown-menuitem-hover-colorText color for the hover state of the dropdown menuitems.
--dropdown-menuitem-hover-text-decorationText decoration for the hover state of the dropdown menuitems.
--dropdown-menuitem-focus-bg-colorBackground color for the focus state of the dropdown menuitems.
--dropdown-menuitem-focus-colorText color for the focus state of the dropdown menuitems.
--dropdown-menuitem-focus-text-decorationText decoration for the focus state of the dropdown menuitems.
--dropdown-menuitem-focus-visible-outlineOutline for the focused dropdown menuitems.
--dropdown-menuitem-focus-visible-outline-offsetOutline offset for the focused dropdown menuitems.
--dropdown-transition-duration0.3sTransition duration for dropdown animations.
--dropdown-transition-timing-functionease-in-outTransition timing function for dropdown animations.
--dropdown-translate-y-0.5remTranslate-y for dropdown animations.

FAQs

Package last updated on 26 Nov 2025

Did you know?

Socket

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.

Install

Related posts