
Vercel and shadcn’s new UI SDK gives AI agents a direct way to use an app’s components, in place of reading the whole page and clicking one control at a time. It also lets you mark actions that need a person’s approval: in one test, an agent using it declined to send a driver comparison when the approval prompt went unanswered, while three browser agents sent it. Better Stack takes a closer look at how the SDK performed when building an interface and when driving one. Discover how its reusable behaviors support keyboard access, how much page text it saves and where the limits remain.
Shadcn UI SDK: A Direct Route to App Components
TL;DR Key Takeaways :
- Vercel and shadcn’s UI SDK provides more than 50 tested, unstyled TypeScript behaviors, with adapters for React, Vue, Svelte, Solid and Web Components.
- In one test, Claude built a custom track map using UI SDK that passed keyboard and focus tests on its first run and scored 100 for Lighthouse accessibility.
- Vercel’s benchmark found the component bridge 54% to 68% cheaper than browser tools across React, Vue and Svelte.
- In an app test, bridge agents read about 13 KB each versus 63 KB for a browser agent, while runs took roughly 27 and 28 seconds respectively.
- In the F1 app test, the bridge declined an approval-required send action when unanswered, while all three browser agents sent the comparison.
UI SDK, released by Vercel and shadcn on November 12, 2026, sits underneath a component library rather than replacing one. It separates common interface behaviors from visual styling and gives agents a way to work with those behaviors, a distinction that has confused some developers.
A browser agent typically reads a page’s accessibility tree, clicks a control and reads a fresh snapshot. UI SDK offers a component bridge alongside tools for agents that build interfaces.
Build Components From Tested Behaviors
UI SDK packages more than 50 tested behaviors in TypeScript, with adapters for React, Vue, Svelte, Solid and Web Components. A select dropdown, for example, combines a pop-up, list selection and typeahead, which lets you type a letter to jump to an option.
You can combine these building blocks to make a component that is not already available in a registry. Roving focus, for instance, lets you move through a list with arrow keys while keeping the list on one tab stop.
The SDK also supplies an agent skill that explains the behaviors and how they fit together, plus a testing kit for keyboard focus and accessibility. Its README says agents, not users, will learn to write behaviors. The parts are unstyled apart from optional starter stylesheets, and the SDK does not resolve the design difficulties agents can have.
Uncover more insights about Shadcn UI SDK and Claude Code in previous articles we have written.
- Why Shadcn is the Secret Weapon Every AI UI Designer Needs
- New Browser API WebMCP : Actually Makes AI Agents Work Efficiently
- Vercel CEO Reveals Powerful AI Development Workflow for Software Engineers
- 12 Best Claude Code Features to Automate and Streamline Your Workflows
- 6 Claude Code Levels Explained : Map Skills from Prompts to Agent Teams
A Custom Map Shows Behaviors at Work
In one test, Claude used the UI SDK skill to build a Brazil Grand Prix track map from roving focus, selection, typeahead and change behaviors. It had been asked for a qualifying explorer with results, sector times and clickable corners; the SDK does not ship a track map.
The roughly 200-line map let you tab into it, move between corners with arrow keys or type a letter to jump. Its keyboard and focus tests passed on the first run, and it received a 100 Lighthouse accessibility score.
Asked for the same map without UI SDK and without a keyboard requirement, the same model produced labeled buttons. But the map had 15 separate tab stops, no typeahead and no tests, while its arrow keys moved the information card without moving focus. The SDK supplied the right interaction patterns and tests on that first attempt, although the underlying behaviors are not new.
The Bridge Gives Agents Component Actions
The bridge exposes components through three tools, set up with a single line of code. Components describe themselves, so the agent API does not need to be handwritten. Snapshot returns a short list of components with their labels, values and actions; query searches a list without opening it; and act can run several steps in one call through the components’ own APIs and change handlers.
On the F1 app, the bridge’s snapshot was about 5 KB, compared with about 12 KB for the opening browser accessibility-tree snapshot. The custom map appeared as “Interlagos corners” with a select-corner action after a couple of lines of agent code named the action and its corners.
An agent could use one action call to select a driver and open a corner card, although component inputs still had to match the available options. A request for Lando Norris was refused until the agent used NOR; the error returned the driver list to choose from.
Vercel’s Benchmark Reports Lower Costs
Vercel published a benchmark in the UI SDK repository that you can run with Claude Code. Its project settings screen had three tabs, 24 team members, row menus and a confirmation dialog. Sonnet and Claude Code had to rename the project, change its visibility, promote and remove members, flip two email switches and save.
In Vercel’s React benchmark, the bridge completed the task with fewer calls and tokens than browser tools driving Base UI:
- Tool calls: Seven with the bridge, compared with 17 using browser tools.
- Tokens: About 70,000 with the bridge, compared with about 292,000.
- Time: 31 seconds with the bridge, compared with 53 seconds.
- Cost: Just over 4 cents with the bridge, compared with 14 cents.
Across React, Vue and Svelte, Vercel’s benchmark put the bridge at 54% to 68% cheaper.
App Tests: Less Reading, Little Time Saved
In an initial F1 app test, with everything on screen and one run per approach, the browser agent made five calls and the bridge agent made three. The browser agent read about 10 times more text.
A second test added driver menus, a comparison tab and a settings dialog. Three Sonnet agents using browser tools and three using the bridge received the same task, including comparing drivers, changing settings and identifying the fastest driver in a sector. All got the answers right.
The browser agent used eight calls and read about 63 KB of page text. Two bridge agents used five calls each and one used eight, while each read about 13 KB. The browser and bridge runs took about 28 and 27 seconds respectively, including a three-second wait for a person in the bridge run. Total tokens fell about 8%, with the agents’ own instructions making up most of the total.
Library Creators Give Mixed Reactions
Reactions to UI SDK on X were mixed, and some creators of other headless libraries were unimpressed by its behaviors. React Aria’s creator joked about the SDK and said its hooks had been battle-tested since 2020; six days later, the React Aria team welcomed reuse of its patterns. Zag.js’s creator said it had used state machines for this kind of work for years.
Solid UI’s maintainer said its components had been rebuilt on UI SDK and were due out any day. Shadcn UI itself has not yet said whether it will switch.
Mark Actions That Need Human Approval
You can mark a button as needing confirmation, with a sentence describing the action, then use an allow callback to ask a person before it runs. The SDK can also hide a section from the agent or redact a secret field. Agent-made changes reach application handlers marked as such, so you can log or cancel them.
In the F1 app test, the send button required approval. The bridge declined the action each time the prompt was left unanswered, while all three browser agents sent the comparison. Without rules, however, the bridge accepts actions that have not been marked.
We think the approval gate matters more than the savings. A page that can tell an agent which actions need a person offers control that clicking through the accessibility tree cannot, and that is what makes agent use of real apps easier to trust. Lower costs in a benchmark are welcome, but an agent that stops and asks before it sends something is the more useful change.
Better Stack would wait to see how others use UI SDK’s early beta and wonders how much of the keyboard result came from its agent skill. For developers seeking to reduce how much page text an agent reads, the bridge did that in the app test, though it saved little time and cut total tokens by only 8%. It does not solve the visual design difficulties of AI-generated interfaces.
Media Credit: Better Stack
Disclosure: Some of our articles include affiliate links. If you buy something through one of these links, Geeky Gadgets may earn an affiliate commission. Learn about our Disclosure Policy.