Blossom UI

Chip input

Chip input or tag input component with validation, a maximum of chips, paste support and keyboard shortcuts.

How to use it

Run npx @blossomui/react add chip-input, or copy src/components/UI/ChipInput/ChipInput.tsx into your React project and import it.

import { ChipInput } from './components/ui/ChipInput'

Props

ChipInputProps

PropTypeDescription
labels{ remove?: (chip: string) => string; duplicate?: (chip: string) => string }Texts of the component. Pass only the ones you want to change, for example to translate it.
valuestring[]
defaultValuestring[]
onChange(value: string[]) => void
labelstring
hintstring
placeholderstring
maxnumberMaximum number of chips.
validate(chip: string) => string | undefinedReturn an error message to reject a chip, or nothing to accept it.
disabledboolean
suggestionsstring[]Values offered while typing. The user can pick one with the arrow keys and Enter, or with the mouse, and can still type anything else.
maxSuggestionsnumberMost suggestions shown at once.

Getting started

  • Introduction
  • Installation
  • Changelog

Customization

  • Colors
  • Brand color
  • Texts and translation

Components

  • Accordion
  • Alert dialog
  • Alerts
  • Avatar
  • Badges
  • Banner
  • Breadcrumb
  • Buttons
  • Calendar
  • Cards
  • Carousel
  • Charts
  • Chip input
  • Collapsible
  • Color picker
  • Combobox
  • Command palette
  • Context menu
  • Copy button
  • Date picker
  • Drawer
  • Dropdown
  • Empty state
  • File upload
  • Footer
  • Forms
  • Hover card
  • Jumbotron
  • KBD
  • Menubar
  • Modal
  • Navbar
  • Navigation menu
  • Number input
  • OTP input
  • Pagination
  • Popover
  • Pricing
  • Progress
  • Rating
  • Resizable panels
  • Scroll area
  • Segmented control
  • Separator
  • Sidebar
  • Skeleton
  • Slider
  • Spinners
  • Stats
  • Stepper
  • Survey
  • Table
  • Tabs
  • Time picker
  • Timeline
  • Timer button
  • Toasts
  • Tooltip
  • Transfer list
  • Tree