Components
Heading
A screen/section title with an optional accent eyebrow above it. Pure display — one heading per view keeps the glance cheap.
Installation
npx @glasskit-ui/cli add headingInstall 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/heading.tsximport type { ReactNode } from "react";import { cn } from "../lib/utils";/** * <Heading> — a screen/section title with an optional eyebrow label above it. * Pure display. Use sparingly — one heading per view keeps the glance cheap. */export function Heading({ children, eyebrow, className,}: { children: ReactNode; /** Small tracked label above the title. */ eyebrow?: ReactNode; className?: string;}) { return ( <div className={cn("gk-heading", className)}> {eyebrow != null ? ( <span className="gk-heading__eyebrow t-caption">{eyebrow}</span> ) : null} <h2 className="gk-heading__title t-title">{children}</h2> </div> );}Usage
<Heading eyebrow="Workout">Morning Run</Heading>Props
Prop
Type
GlowIcon
Wraps a stroke-only line-icon SVG and applies the two-tier luminance rule: inert = near-white, active = the accent with a faint glow — or an iOS-style gradient plate via `plate`. Token sizes, no inline style.
Meter
A bounded ring gauge for a level (battery, signal, effort) — distinct from Progress, which tracks task completion. The arc fills via an SVG stroke-dashoffset; value is clamped to [0, max].