1.2.8 • Published 1 day ago

@frankhoodbs/dropdown-cmp v1.2.8

Weekly downloads
-
License
ISC
Repository
-
Last release
1 day ago

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-options-An array of link items for the dropdown menu
data-id-prefix-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
linkSlot for custom content of each dropdown menu itemoption: The current option object from options propindex: The current index of the option in the options arrayattr: Object with predefined attributes for the menu item

CSS Custom Properties

Custom PropertyDefault ValueDescription
--dropdown-cmp-button-backgroundtransparentBackground color of the dropdown button.
--dropdown-cmp-button-colorblackText color of the dropdown button.
--dropdown-cmp-button-border-width0pxWidth of the dropdown button border.
--dropdown-cmp-button-border-colortransparentColor of the dropdown button border.
--dropdown-cmp-button-border-radius0pxBorder radius of the dropdown button.
--dropdown-cmp-disabled-opacity0.5Opacity for the disabled state of the dropdown button.
--dropdown-cmp-menu-width100%Width of the dropdown menu.
--dropdown-cmp-menu-min-width0Minimum width of the dropdown menu.
--dropdown-cmp-menu-max-widthnoneMaximum width of the dropdown menu.
--dropdown-cmp-menu-backgroundwhiteBackground color of the dropdown menu.
--dropdown-cmp-menu-colorblackText color of the dropdown menu.
--dropdown-cmp-menu-border-width1pxWidth of the dropdown menu border.
--dropdown-cmp-menu-border-colorblackColor of the dropdown menu border.
--dropdown-cmp-menu-border-radius4pxBorder radius of the dropdown menu.
--dropdown-cmp-menu-max-height200pxMaximum height of the dropdown menu.
--dropdown-cmp-option-active-backgroundgreyBackground color for active/hovered dropdown option.
--fh-color-outlineredOutline color for the active dropdown option.
--fh-size-outline3pxWidth of the outline for the active dropdown option.
--fh-size-outline-offset1pxOffset of the outline for the active dropdown option.
--dropdown-cmp-transition-duration0.3sTransition duration for dropdown animations.
--dropdown-cmp-transition-timing-functionease-in-outTransition timing function for dropdown animations.
1.2.8

1 day ago

1.2.7

1 day ago

1.2.4

2 days ago

1.2.3

6 days ago

1.2.2

19 days ago

1.2.1

22 days ago

1.2.0

23 days ago

1.1.19

23 days ago

1.1.16

2 months ago

1.1.14

2 months ago

1.1.18

2 months ago

1.1.17

2 months ago

1.1.13

2 months ago

1.1.12

3 months ago

1.1.11

3 months ago

1.1.10

4 months ago

1.1.9

4 months ago

1.1.8

4 months ago

1.1.7

4 months ago

1.1.6

4 months ago

1.1.1

4 months ago

1.1.3

4 months ago

1.1.2

4 months ago

1.0.12

7 months ago

1.0.11

7 months ago

1.0.7

7 months ago

1.0.6

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

8 months ago