Skip to Content
ComponentsDropdownList

DropdownList

The DropdownList component is a dropdown selector with animated expansion and customizable options.

DropdownList

Basic Usage

const options = [ { label: "Option 1", value: "option1" }, { label: "Option 2", value: "option2" }, { label: "Option 3", value: "option3" }, ]; <DropdownList options={options} placeholder="Select an option" onSelect={setSelectedOption} />

Import

import DropdownList from "../components/DropdownList";

Props

  • options (array, Required): Array of {label, value} objects.
  • onSelect (function, Required): Function called when option is selected.
  • placeholder (string): Placeholder text when no option selected.
  • header (string): Optional header text above options.