If you have any project questions, concerns, or contribution ideas, join our #pwa Slack channel. Find out how to create an account by visiting Community Resources

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

useDropdown() ⇒ Dropdown

A React Hook for adding dropdown-related logic.

Kind: global function
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

Kind: global typedef
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

For implementation details View Source.