Vercel Labs has released UI SDK, an open source library for composing interfaces from reusable interaction behaviors. The public beta includes a framework-neutral core plus adapters for React, Vue, Svelte, Solid, and Web Components. It is available under the Apache 2.0 license.

The unit of reuse gets smaller

A behavior packages one piece of headless interaction logic, including state, keyboard handling, focus management, and relevant ARIA attributes. Headless packages leave visual styling to the application. A Select, for example, can combine createPopup, createSelection, and createTypeahead. Those behaviors can also support a combobox, autocomplete, tag picker, or custom assignee menu.

The core currently includes behaviors for focus, selection, dismissal, popups, drag and drop, resizing, virtualization, and other common interaction patterns:

  • createRovingFocus manages arrow-key navigation with one Tab stop.
  • createTypeahead adds jump-to-letter navigation inside lists.
  • createPopup manages anchored, dismissible overlays.
  • createSelection supports single and multiple selection with Shift and Ctrl modifiers.
  • createReorder handles reorderable collections.