Components
Badge
A small count or status pill. Pure display — hairline by default, accent emphasis for the one thing that should draw the eye (the accent gradient, for the one thing that needs the eye).
Installation
npx @glasskit-ui/cli add badgeInstall 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/badge.tsximport type { ReactNode } from "react";import { cn } from "../lib/utils";/** * <Badge> — a small count or status pill (notification counts, live state). * Pure display. Subtle surface by default; emphasis='accent' gives it the accent * gradient for the one thing that needs to draw the eye. */export function Badge({ children, emphasis = "default", className,}: { children: ReactNode; /** Visual weight — accent for the one badge that matters. */ emphasis?: "default" | "accent"; className?: string;}) { return ( <span className={cn( "gk-badge t-caption", emphasis === "accent" && "gk-badge--accent", className, )} > {children} </span> );}Usage
<Badge emphasis="accent">LIVE</Badge>Props
Prop
Type
Screen
The on-lens layout shell: a status region, a centered stage for the one task, and a cue region — with safe margins that keep the surface mostly black.
Clock
The home time / date complication: a big tabular time, a quieter date, and an optional meta line (weather, alarm). Pass preformatted strings — you own the locale.