Wink Pings

Agents Keep Failing at UI? Try Breaking Popups, Focus, and Selection Into Behavior Primitives

The shadcn/ui team released a UI SDK that does not provide components, only 50+ behavior primitives. Agents can compose Select, Autocomplete, or even new components themselves, across React, Vue, Svelte, and Solid. Commenters pointed out that this is essentially giving the agent an accessibility tree, so it no longer relies on pixel coordinates.

Baoyu recommended a video on X explaining the UI SDK; the original author is the shadcn/ui team. The video has no voiceover and is tiring to watch, so he added dubbing. UI SDK breaks UI components into behavior primitives that agents can use, such as opening a popup and moving focus with arrow keys. The advantage is that it is component-agnostic; agents can directly compose and apply it to React, Vue, Svelte, Solid, and other frameworks. Recommend watching the video and docs: https://ui-sdk.dev/

There are two videos here: the first is Baoyu's translated and dubbed version, and the second is the original shadcn version. Note that "we" in the video refers to the shadcn/ui team.

The core idea of UI SDK: do not give the agent a Select component; give it the pieces that make it up. For example, createPopup (open popup, position, close), createSelection (select one or more, supports Shift and Ctrl), and createTypeahead (type to jump to an option). This way the agent can not only assemble Select, but also autocomplete, combobox, or even new components you have not thought of. The external page says: it abstracts complex interactions into reusable behaviors and teaches the agent how to build and use them. There are currently 50+ behaviors, including createRovingFocus, createReorder, createResize, createViewport, createVirtualizer, etc.

Usage is simple: you do not need to use the behaviors directly; let the agent use them. After it learns all the behaviors, it picks and combines them in your framework. The official team also provides a component library, where each component is made of the same behaviors, across React, Vue, Svelte, Solid, and Web Components. Components include Color Picker, Token Input, Number Input, Switch, Resizable, Slider, Command, Accordion, Rating, Segmented Control, Calendar, Tabs, OTP Input, Tree, Toolbar, etc.

More importantly, the agent uses the interface it builds itself. It directly reads the page and operates controls without screenshots. The official claim is that this is more than twice as fast and costs less than half. There is a demo on the page: ask the agent to move the project to Asia Pacific, switch to Pro, run 3 instances, and open preview deployments; it reads the form itself and fills it in.

A commenter asked, in the AI era, is this still meaningful? Can't the agent just do it directly? Another commenter added that the idea of these behavior primitives is similar to Playwright's accessibility tree; the value is that agent operations no longer depend on pixels or coordinates, so stability will be much better. Someone also mentioned that previously letting agents manually wire up menus, focus, and other such things always led to errors.

Baoyu's reply mentions that the translated video was made with Antigravity + Gemini TTS + OpenArtifact Motion.

image

Source code on GitHub: https://github.com/vercel-labs/ui
Docs: https://ui-sdk.dev/docs

发布时间: 2026-11-27 07:25