Skip to main content

Select

Import

import { Select } from "@sparrowengg/twigs-react";
info

Select component is powered by react-select. API options supported by react-select will be supported in Twigs as well.

Usage

Result
Loading...
<Select
  size="lg"
  options={[{
    label: "Option 1",
    value: "option1"
  }, {
    label: "Option 2",
    value: "option2"
  }, {
    label: "Option 3",
    value: "option3"
  }]}
/>

Props

PropertyDescriptionTypeDefault
placeholderstring
isClearableIs the select value clearablebooleanfalse
isSearchableWhether to enable search functionalitybooleantrue
isMultiSupport multiple selected optionsbooleanfalse
disabledbooleanfalse
sizesm md lg xlmd
labelstring
variantdefault filleddefault
showSeparatorShow a line separator between option and dropdown indicatorbooleanfalse
isAsyncbooleanfalse
isCreatableAbility to create option from the select, if option is not presentbooleanfalse
dropdownIndicatorIcon
dropdownIndicatorPosition