Skip to main content

ListboxComponent

The ListboxComponent is a react component that renders a basic listbox, given an array of options.

PropertiesTypeDefaultDescription
optionsarray<string>[]Returns a record containing the properties to be used in the container element.
multiselectoption<boolean>falseIndicates whether the listbox allows multiple selection.
classNameoption<string>NoneThe class name to be applied to the container element.
optionClassNameoption<string>NoneThe class name to be applied to the option elements.
activeClassNameoption<string>NoneThe class name to be applied to the active option elements.

Example

<Listboxkit.ListboxComponent
  className="listbox"
  multiSelect=true
  optionClassName="listbox-option"
  options=["Red", "Green", "Blue"]
/>
  • Red
  • Green
  • Blue