Skip to content

An autocomplete input field with selectable chips & dynamic filter

Notifications You must be signed in to change notification settings

amhsirak/chip-drop

Repository files navigation

Chip Component

View it live here: https://chip-drop.vercel.app/

Local Setup

  1. Clone the repository.
  2. Install dependencies: npm install.
  3. Run the project: npm run dev.

Specifications

  1. When you click on the input field, a list of items will appear.
  2. As you type, the list should show only items that match what you're typing.
  3. Clicking on an item should turn it into a chip at the top, and the input field should adjust automatically.
  4. Once an item becomes a chip, it should no longer be in the list.
  5. Each chip has an "X" icon. Clicking it removes the chip and adds the item back to the list.
  6. When the input is blank and the user presses backspace, the last chip (for example, Nick Giannopoulos) should get highlighted and on again pressing backspace it should get deleted.

Keyboard Shortcuts

  1. Esc to hide dropdown.
  2. Enter to select option from dropdown.
  3. Arrow Up and Arrow Down to navigate the items of the dropdown.
  4. Consecutive Backspaces to delete last selected option.

About

An autocomplete input field with selectable chips & dynamic filter

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published