Components
CallCard
An incoming / active call: a big avatar, caller name, a status line, and round accept / decline actions (the one place a semantic green/red reads clearer than the single accent).
Installation
npx @glasskit-ui/cli add call-cardInstall the SDK (it provides GlassViewport, useDpad and the stylesheet), then copy these files into your project:
npm install @glasskit-ui/react// components/lib/utils.tsexport type ClassValue = string | number | null | undefined | false;/** * Join truthy class names. Dependency-free on purpose: the lens components * style via bespoke semantic classes (no conflicting Tailwind utilities to * de-dupe), so this needs no clsx/tailwind-merge and resolves from anywhere * the registry is vendored. */export function cn(...inputs: ClassValue[]): string { return inputs.filter(Boolean).join(" ");}/** * 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/call-card.tsximport type { ReactNode } from "react";import { cn } from "../lib/utils";/** * <CallCard> — an incoming / active call: a big avatar, caller name, a status * line ("Incoming…", "02:14"), and an action row (accept / decline via * D-pad-focusable <Button>s). Drop it into a <Screen> stage. */export function CallCard({ avatar, name, status, actions, className,}: { /** A large <Avatar>. */ avatar?: ReactNode; name: ReactNode; /** "Incoming call", a running timer, etc. */ status?: ReactNode; /** Accept / decline buttons. */ actions?: ReactNode; className?: string;}) { return ( <div className={cn("gk-call", className)}> {avatar != null ? ( <span className="gk-call__avatar">{avatar}</span> ) : null} <span className="gk-call__name t-title">{name}</span> {status != null ? ( <span className="gk-call__status t-body">{status}</span> ) : null} {actions != null ? ( <div className="gk-call__actions">{actions}</div> ) : null} </div> );}Usage
<CallCard avatar={<Avatar name="Devon Reyes" tone="cyan" size="lg" />} name="Devon Reyes" status="Incoming call" actions={<><DeclineButton /><AcceptButton /></>}/>Props
Prop
Type
Avatar
A contact / sender avatar — a photo when you have one, else initials on a gradient plate. The building block for notifications, chats, and calls.
ChatBubble
A conversation view. <MessageThread> stacks <ChatBubble>s â from="them" is a surface bubble at the start, from="me" is the accent-gradient bubble at the end. RTL-safe.