Blocks
Copy for LLM
AssistantOrb
The Meta-AI presence: a glowing gradient orb that animates per state: idle breathe, listening pulse, thinking swirl, speaking. Pair with a transcript line.
Installation
npx @glasskit-ui/cli add assistant-orbInstall the SDK (it provides GlassViewport, useDpad and the stylesheet), then copy these files into your project:
npm install @glasskit-ui/react// components/lib/utils.tsimport { clsx, type ClassValue } from "clsx";import { twMerge } from "tailwind-merge";export type { ClassValue };/** * Merge class names the shadcn way: clsx joins conditionals, tailwind-merge * de-dupes conflicting Tailwind utilities so a consumer's `className` override * wins (e.g. passing `px-2` beats the component's `px-6`). Lens components are * Tailwind utilities + `--gk-*` tokens, so this de-dupe matters. */export function cn(...inputs: ClassValue[]): string { return twMerge(clsx(inputs));}/** * Accessible name from a free-form `label` prop: the label itself when it's a * plain string, otherwise undefined (a ReactNode can't become an aria-label). */export function stringLabel(label: unknown): string | undefined { return typeof label === "string" ? label : undefined;}// components/glasskit/assistant-orb.tsximport type { ReactNode } from "react";import { cn } from "../lib/utils";/** * <AssistantOrb> — the Meta-AI presence: a glowing gradient orb that animates * per `state` (idle = gentle breathe, listening = pulse, thinking = swirl, * speaking = quick pulse). Pair it with a `label` / transcript line. Motion * collapses under reduce-motion. */export function AssistantOrb({ state = "idle", label, className,}: { state?: "idle" | "listening" | "thinking" | "speaking"; /** Optional caption (e.g. "Listening…" or the transcript). */ label?: ReactNode; className?: string;}) { return ( <div className={cn("gk-orb", `gk-orb--${state}`, className)} role="status" aria-label={typeof label === "string" ? label : `Assistant ${state}`} > <span className="gk-orb__core" aria-hidden="true" /> {label != null ? ( <span className="t-body text-muted-foreground text-center max-w-[26ch]"> {label} </span> ) : null} </div> );}Usage
<AssistantOrb state={aiState} label={transcript} />Props
| Prop | Type | Default | Description |
|---|---|---|---|
state | "idle" | "listening" | "thinking" | "speaking" | "idle" | Drives the orb animation. |
label | ReactNode | — | Caption / transcript line. |
NowPlaying
A media now-playing card: album art, title + artist, a scrub bar, and elapsed / remaining times. A status display for playback your app tracks. Audio support in the Display webview is undocumented; verify on-device.
Overview
Complete multi-screen apps composed from the real components. Each template gets its own page so its D-pad focus and inputs stay isolated. Drive them with your keyboard, or scan the QR to run them on your glasses.