Multi-SelectLoading saved progress…

Multi-Select

A multi-select keeps one selected collection and derives the searchable options that remain. Build the skills picker in React so users can filter, add, and remove chips with a mouse or keyboard without creating duplicate state.

Signature

Implement the App component in App.tsx. It receives no props and renders the provided eight skills with React and TypeScript selected initially.

Examples

  • On load, the two initial chips appear and the list shows Vue, Angular, Svelte, Node, GraphQL, CSS in source order.
  • Typing g leaves Angular and GraphQL; clicking GraphQL adds its chip, clears the query, and restores all remaining options.
  • With an empty input, Backspace removes the last chip. Removing any chip returns that skill to its original source-order position.
  • ArrowDown / ArrowUp wrap through filtered options; Enter selects the active option and Escape clears the query and highlight.

Notes

  • Single source of truth. Store only selected, query, and activeIndex; derive available and filtered options during render.
  • Selection contract. Ignore duplicate adds, append new chips in selection order, and focus the input after adding or removing.
  • Filtering contract. Match a trimmed query as a case-insensitive substring while excluding every selected skill.
  • Keyboard contract. Reset the highlight when the query changes; navigation wraps within the current filtered list.
  • Accessible combobox. Keep DOM focus on the input, expose the listbox with aria-controls, and point aria-activedescendant at the highlighted option. Every remove button needs its skill in the accessible name.
  • Starting shell. The starter is an inert but complete initial frame. Replace the snapshot with state and event wiring; the styles are finished.
WE’RE LISTENING

Help make UIReady better

Found a bug or have an idea? Tell us about it.

Up to 3 files · 5 MiB each · JPG, PNG, WebP, MP4, WebM, MP3, M4A or WAV