A CLI device login that shows exactly what is being approved, side by side with the terminal.
Import it and pass your content. The props that matter most are listed next.
import { DeviceAuth } from "@/components/ui/notchset/blocks/device-auth";
export function Device({ code }: { code: string }) {
return (
<DeviceAuth
command="relay login"
verifyUrl="relay.dev/device"
userCode={code}
device={{ name: "relay-cli 2.4 on macOS", facts: [{ label: "DEVICE", value: "Maya's MacBook" }] }}
workspaces={[{ value: "acme", label: "ACME LABS" }]}
scopes={[{ id: "runs:read", label: "runs:read", description: "Read runs and traces", defaultOn: true }]}
onLookup={async (c) => (await fetch(`/api/device/${c}`)).ok}
onAuthorize={async (grant) => {
await fetch("/api/device/approve", { method: "POST", body: JSON.stringify(grant) });
return ["Logged in as maya@acme.dev · Acme Labs"];
}}
/>
);
}command / verifyUrl / userCode–
stringWhat the terminal ran, where to go and the code it shows.
device–
{ name, facts: { label, value }[] }What the browser shows on Is this you?
workspaces / scopes–
options / { id, label, description, defaultOn?, dangerous? }[]dangerous is the warning shown while it's ticked; such scopes should be off by default.
onLookup / onAuthorize / onDeny–
(code) => Promise<boolean> / (grant) => Promise<string[]> / () => PromiseYour device-flow endpoints; onAuthorize resolves with the terminal's success lines.
expiresIn / tokenNote / fillLabel–
number / string / stringSeconds left, the granted note, and a demo-only fill button.
DeviceAuthdata-slot="device-auth"
The terminal and the browser's enter, confirm and result steps.
components/ui/notchset/blocks/device-auth.tsx
This component is included with Pro.
Try the live preview above. Get Pro to install the source.
pnpm dlx shadcn@latest add @beautiful-ui-pro/device-authNeeds your registry key. Your components.json style picks the Base UI or Radix build: radix-*, new-york and default get Radix, base-* gets Base UI.
The CLI adds the styles to the CSS file named in components.json (tailwind.css). Check that it points at your global stylesheet, that the project uses Tailwind CSS v4, and that the file is imported in your root layout. Installed by hand: paste styles.css into that file.
Give your coding assistant the Markdown guide instead of screenshots.
https://beautiful-ui.dev/api/mcp (setup)v1.0.0 · 2026-10-04
First release
Pro is in early access.