useDropdown()
Functions
- useDropdown() ⇒
Dropdown
A React Hook for adding dropdown-related logic.
Typedefs
- Dropdown :
Object
The object returned contains the pieces needed to add the dropdown logic to your components
A React Hook for adding dropdown-related logic.
Returns:
Dropdown
— An object containing functions and values to add dropdown logic
The object returned contains the pieces needed to add the dropdown logic to your components
Properties
Name | Type | Description |
---|---|---|
elementRef | Ref | A ref object for attaching to React elements |
expanded | Boolean | The value of the expanded state |
setExpanded | function | State Hook function for setting the expanded state |
triggerRef | Ref | A ref object for attaching to React elements |
Source Code: pwa-studio/packages/peregrine/lib/hooks/useDropdown.js