Dropdown - Keep React

The Dropdown Component is a versatile user interface element that provides users with a menu of selectable options. With a wide range of customization options, including labels, icons, search bars, checkboxes, and more, the Dropdown Component enhances user interaction by offering intuitive and flexible selection functionalities.

Table of Contents#

Default Dropdown#

The Default Dropdown represents some list items as a dropdown items with <Dropdown.Item> components and the <Dropdown> is a wrapper button where user can click to show the dropdown items. dismissOnClick={true} props means when the user select a dropdown item dropdown will be closed.

The Dropdown with Search Bar component features a search bar that allows users to filter and select from a list of fruit options.

The Dropdown with Both Side Icon component combines dropdown items with icons on both sides of the label.

The Dropdown with Both Side Icon component combines dropdown items with search bar <TextInput> component.

The dropdown with title description component represents the title and description in every dropdown items.

API Reference#

Here is a list of the props that you can pass to the dropdown component:

PropertyDescriptionTypeDefault
placementDefines the placement of the dropdown.
top
top-start
top-end
bottom
bottom-start
bottom-end
left
left-start
left-end
right
right-start
right-end
bottom-start
triggerSpecifies the trigger behavior for the dropdown.
hover
click
click
labelThe content to display within the dropdown.stringDropdown Button
floatingArrowEnables or disables the floating arrow within the dropdown.booleanfalse
arrowIconEnables or disables the arrow icon.booleantrue