Skip to Content
✨ QuickCode UI keeps growing! More components, more features, and more ways to make your projects shine. Stay tuned & maybe… hire me or sponsor me 😉 
DocumentationMultiInput

MultiInput

An input field that allows users to add multiple values displayed as badges. Values can be added by pressing Enter, comma, or space, and removed by clicking the X button or pressing Backspace.

Install Dependencies

npx
quickcode-ui add MultiInput

Usage

Multi Input

reacttypescriptnextjs
You can add 7 more items.

Press Enter or comma to add. Backspace to remove last.
Duplicate Values are not allowed

Props

PropTypeDefaultDescription
valuestring[][]Array of current values
onChange(values: string[]) => voidCallback when values change
placeholderstring"Type and press Enter..."Placeholder text
separator"enter" | "comma" | "space" | Array<"enter" | "comma" | "space">["enter","comma"]Trigger to add new values
maxnumberMaximum number of values allowed
onMaxReached() => voidCallback when max limit is reached
disabledbooleanfalseWhether the input is disabled
showMaxLabelbooleantrueWhether to show remaining items label
classNamestringAdditional custom classes
idstringID for associating with label
Last updated on