Feature Bento Grid
Interactive bento showcase powered by UI SDK Tabs and a live Switch toggle so visitors and agents can inspect each capability panel.
Install UI SDK & packages
npm install @ui-sdk/react @ui-sdk/core lucide-react
Give your agent the UI SDK skill
npx skills add vercel-labs/ui --skill ui-sdk
UI SDK entries:
@ui-sdk/react/tabs
@ui-sdk/react/switch
@ui-sdk/react/field
"use client"; import * as React from "react"; import { Bot, Keyboard, ShieldCheck } from "lucide-react"; import { Field, FieldLabel } from "@ui-sdk/react/field"; import { Switch, SwitchThumb } from "@ui-sdk/react/switch"; import { Tabs, TabsList, TabsPanel, TabsTab } from "@ui-sdk/react/tabs"; const PANELS = [ { value: "behaviors", title: "Behaviors", icon: Keyboard, headline: "Keyboard, focus, and ARIA built in", body: "Arrow-key navigation, focus recovery, dismissal, and top-layer popups come straight from @ui-sdk/core without portals or providers.", }, { value: "agent-bridge", title: "Agent Bridge", icon: Bot, headline: "Inspectable state with snapshot() and act()", body: "Every control has an accessible name and typed actions so AI agents operate the UI cleanly instead of guessing coordinates.", }, { value: "webmcp", title: "WebMCP", icon: ShieldCheck, headline: "Human guardrails on sensitive actions", body: "Mark checkout, delete, and publish buttons with data-agent-confirm so browser agents ask before running anything risky.", }, ]; export function FeatureBentoGrid() { const [tab, setTab] = React.useState("behaviors"); const [requireConfirm, setRequireConfirm] = React.useState(true); return ( <div className="grid gap-4 md:grid-cols-3"> <div className="rounded-2xl border border-border bg-card p-6 md:col-span-2"> <Tabs value={tab} onValueChange={(v) => v && setTab(v)}> <TabsList aria-label="Feature highlight" className="inline-flex gap-1.5 rounded-xl border border-border bg-background/70 p-1"> {PANELS.map((panel) => ( <TabsTab key={panel.value} value={panel.value} className="cursor-pointer rounded-lg px-3 py-1.5 text-xs font-bold text-muted-foreground transition data-selected:bg-sky-400 data-selected:text-slate-950" > {panel.title} </TabsTab> ))} </TabsList> {PANELS.map((panel) => { const Icon = panel.icon; return ( <TabsPanel key={panel.value} value={panel.value} className="mt-5"> <div className="inline-flex h-10 w-10 items-center justify-center rounded-xl bg-sky-400/15 text-sky-400"> <Icon className="h-5 w-5" aria-hidden="true" /> </div> <h3 className="mt-4 text-lg font-bold text-foreground">{panel.headline}</h3> <p className="mt-2 text-sm leading-relaxed text-muted-foreground">{panel.body}</p> </TabsPanel> ); })} </Tabs> </div> <div className="flex flex-col justify-between rounded-2xl border border-border bg-card p-6"> <div> <h3 className="text-base font-bold text-foreground">Safety Guardrail</h3> <p className="mt-1.5 text-xs leading-relaxed text-muted-foreground"> Gate high-impact actions with a human confirmation prompt before an agent executes them. </p> </div> <Field className="mt-6 flex items-center justify-between gap-3 rounded-xl border border-border bg-background/60 px-3.5 py-3"> <FieldLabel className="text-xs font-semibold text-foreground">Require human confirm</FieldLabel> <Switch checked={requireConfirm} onCheckedChange={setRequireConfirm} className="relative inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border border-border bg-secondary p-0.5 transition data-checked:bg-sky-400" > <SwitchThumb className="h-4 w-4 rounded-full bg-white shadow transition-transform data-checked:translate-x-5" /> </Switch> </Field> </div> </div> ); } export default FeatureBentoGrid;