Knit UI
GitHub

Playground

Loading playground…

false
false
false
false
false
false
Playground
<MultiSelect
  data={["React", "Vue", "Svelte", "Angular", "Solid", "Qwik", "Ember"]}
  placeholder="Pick a framework"
  size="sm"
  searchable={false}
  clearable={false}
  disabled={false}
  readOnly={false}
/>

Examples

Sizes

The seven sizes side by side with a pre-selected value so pills are visible.

Loading example…

SizesSourceStorybook

Shadows

Each elevation of the inherited shadow prop applied to the field frame.

Loading example…

ShadowsSourceStorybook

Disabled

Disabled state — pills render but the dropdown cannot be opened and values cannot change.

Loading example…

DisabledSourceStorybook

Read Only

ReadOnly mode — the dropdown opens but selecting and removing values is not possible.

Loading example…

Read OnlySourceStorybook

Searchable

Searchable — the field accepts keyboard input to filter the options list.

Loading example…

SearchableSourceStorybook

Clearable

Clearable — a clear button appears once at least one value is selected.

Loading example…

ClearableSourceStorybook

Max Values

MaxValues — limits selection to two items; onMaxValues fires when the cap is hit.

Loading example…

Max ValuesSourceStorybook

Grouped

Grouped options — data contains { group, items } entries rendered under section headers.

Loading example…

GroupedSourceStorybook

With Label

WithLabel — label, description and error props attach accessible text around the field.

Loading example…

With LabelSourceStorybook

Hide Picked Options

HidePickedOptions — already-selected values disappear from the dropdown.

Loading example…

Hide Picked OptionsSourceStorybook

Custom Render Option

CustomRenderOption — each option renders with a custom icon alongside its label.

Loading example…

Custom Render OptionSourceStorybook

Styles

Per-slot styles targets individual parts — here the pill chips and the dropdown option rows.

Loading example…

StylesSourceStorybook

Controlled

Controlled — value and onChange are wired to React state; pills reflect external state.

Loading example…

ControlledSourceStorybook

Props

PropTypeDefaultDescription
checkIconPosition"left" | "right" | undefined'left'Side the check icon renders on.
clearableboolean | undefinedfalseShow a clear button when at least one value is selected.
clearButtonPropsPartial<ComboboxClearButtonProps> | undefined—Props forwarded to the internal clear `Combobox.ClearButton`.
clearSearchOnChangeboolean | undefinedtrueClear the search field after a value is selected.
clearSectionMode"default" | "clear" | "rightSection" | "both" | undefined'both'How the clear button and right section coexist.
comboboxPropsPartial<ComboboxProps> | undefined—Props forwarded to the underlying `Combobox`.
dataComboboxData | undefined—Options to render. Strings, `{ value, label, disabled }`, or groups.
defaultDropdownOpenedboolean | undefined—Uncontrolled initial dropdown opened state.
defaultSearchValuestring | undefined—Uncontrolled initial search value.
defaultValuestring[] | undefined—Uncontrolled initial values.
descriptionReactNode——
descriptionPropsGetFinalProps<RNTamaguiTextNonStyleProps, TextStylePropsBase, { span?: boolean | undefined; size?: string | number | undefined; inherit?: boolean | undefined; lineClamp?: number | undefined; truncate?: boolean | "end" | "start" | undefined;…——
disabled systemboolean | undefinedfalse—
dropdownOpenedboolean | undefined—Controlled dropdown opened state.
errorReactNode——
errorPropsGetFinalProps<RNTamaguiTextNonStyleProps, TextStylePropsBase, { span?: boolean | undefined; size?: string | number | undefined; inherit?: boolean | undefined; lineClamp?: number | undefined; truncate?: boolean | "end" | "start" | undefined;…——
filterOptionsFilter | undefineda case-insensitive label substring match.Custom options filter.
formstring | undefined—Associated `<form>` id for the hidden input.
hiddenInputNamestring | undefined—Hidden web-form input name (renders a comma-joined hidden field).
hiddenInputValuesDividerstring | undefined','Divider for the hidden input value.
hidePickedOptionsboolean | undefinedfalseHide already-selected options from the dropdown.
idstring | undefined—Same as the web id property for setting a uid on an element
inputContainer((children: ReactNode) => ReactNode) | undefined——
inputSizestring | undefined—Host size attribute for the input element
inputWrapperOrderInputWrapperOrderItem[] | undefined——
labelReactNode——
labelElement"div" | "label" | undefined——
labelPropsInputLabelProps | undefined——
leftSectionReactNode—Content section displayed on the left side of the input
leftSectionPointerEventsInputSectionPointerEvents | undefined"none"Sets pointer-events styles on the left section element
leftSectionPropsPartial<GetFinalProps<RNTamaguiViewNonStyleProps, StackStyleBase, { shadow?: "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined; sectionPointerEvents?: "none" | "all" | undefined; }>> | undefined—Props passed down to the left section element
leftSectionWidthnumber | Animated.AnimatedNode | GetThemeValueForKey<"width"> | null | undefined—Left section width, by default equals to the input height
limitnumber | undefinedInfinityMaximum number of options displayed.
loadingboolean | undefined—Displays loading indicator in the left or right section
loadingPosition"left" | "right" | undefined"right"Position of the loading indicator
maxDropdownHeightnumber | undefined250Max dropdown height in px before scrolling.
maxValuesnumber | undefinedInfinityMaximum number of values that can be selected.
nothingFoundMessageReactNode—Message shown when no option matches / data is empty.
onBlurFocusEventHandler<HTMLInputElement> | undefined—Field blur handler (forwarded to the inner field).
onChange((value: string[]) => void) | undefined—Called when the selected values change.
onClear(() => void) | undefined—Called when the clear button is pressed.
onDropdownClose(() => void) | undefined—Called when the dropdown closes.
onDropdownOpen(() => void) | undefined—Called when the dropdown opens.
onFocusFocusEventHandler<HTMLInputElement> | undefined—Field focus handler (forwarded to the inner field).
onKeyDownKeyboardEventHandler<HTMLInputElement> | undefined—Field keydown handler (fires after the built-in navigation).
onMaxValues(() => void) | undefined—Called when the user tries to select more than `maxValues`.
onOptionSubmit((value: string) => void) | undefined—Called when an option is submitted (before value changes).
onRemove((value: string) => void) | undefined—Called with the value of a removed item.
onSearchChange((value: string) => void) | undefined—Called when the search value changes.
placeholderstring | undefinedPick a frameworkPlaceholder for the inner field.
pointerboolean | undefined—Determines whether the input should have cursor: pointer style
radius systemstring | number | undefined—Key of theme radius or a valid CSS value to set border-radius
readOnlyboolean | undefinedfalseRead-only mode (dropdown opens but values can't change).
renderOptionComboboxRenderOption | undefined—Custom option content. Receives `{ option, checked }`.
renderPillComboboxRenderPill | undefined—Custom pill content. Receives `{ option, value, onRemove, disabled }`; replaces the built-in `Pill`.
requiredboolean | undefined——
rightSectionReactNode—Content section displayed on the right side of the input
rightSectionPointerEventsInputSectionPointerEvents | undefined"none"Sets pointer-events styles on the right section element
rightSectionPropsPartial<GetFinalProps<RNTamaguiViewNonStyleProps, StackStyleBase, { shadow?: "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined; sectionPointerEvents?: "none" | "all" | undefined; }>> | undefined—Props passed down to the right section element
rightSectionWidthnumber | Animated.AnimatedNode | GetThemeValueForKey<"width"> | null | undefined—Right section width, by default equals to the input height
searchableboolean | undefinedfalseAllow filtering options by typing into the field.
searchValuestring | undefined—Controlled search value.
selectFirstOptionOnChangeboolean | undefinedfalseHighlight the first matching option after each search change.
shadow system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined——
size system"xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined
xxs · xs · sm · md · lg · xl · xxl
'md'Control size — height, padding, radius and font size.
styles systemSlotStyles<MultiSelectStyles> | undefined—Per-slot style sugar — props spread onto the matching part.
theme systemThemeName | null | undefined—Applies a theme to this element
valuestring[] | undefined—Controlled selected values.
variant systemInputVariant | undefined"default"Visual variant
withAsteriskboolean | undefined——
withCheckIconboolean | undefinedtrueShow a check icon next to selected options.
withScrollAreaboolean | undefinedtrueWrap options in a `ScrollArea.Autosize`.
wrapperPropsPartial<GetFinalProps<RNTamaguiViewNonStyleProps, StackStyleBase, { radius?: string | number | undefined; size?: string | number | undefined; shadow?: "xs" | "sm" | "md" | "lg" | "xl" | "xxs" | "xxl" | undefined; disabled?: boolean | undefi…——

Style slots

Every part of MultiSelect can be styled through the styles prop. Explicit props on the component always win over slot styles.

SlotTargets
chevronProps for the chevron (MultiSelect.Chevron).
clearButtonProps for the clear button (MultiSelect.ClearButton).
dropdownProps for the floating surface (MultiSelect.Dropdown).
emptyProps for the empty state (MultiSelect.Empty).
groupProps for an option group (MultiSelect.Group).
optionProps for each option row (MultiSelect.Option).
optionsProps for the listbox body (MultiSelect.Options).
pillProps for each selected-value chip (MultiSelect.Pill → Pill).
pillsProps for the pill row wrapper (MultiSelect.Pills → Pill.Group).
rootProps for the state-machine root (MultiSelect.Root → <Combobox>).
triggerProps for the field trigger (MultiSelect.Trigger → PillsInput).
Accessibility & DOM props (2)
PropType
keyKey | null | undefined
refRef<(HTMLElement & TamaguiElementMethods) | View> | undefined

Plus 492 inherited style props from Box — the full Tamagui/React Native style surface, including token shorthands like p, mx, bg and c. See Tokens for the scales they accept, or the full list.

Edit this page on GitHub