import * as React from "react";
import { createRoot } from "react-dom/client";
import { SiteErrorBoundary } from "@colineapp/sdk/site/react";
import { IconBrandNpm, IconCode, IconDeviceDesktop, IconFileText, IconMoon, IconRobot, IconSun } from "@tabler/icons-react";
import {
Badge,
Button,
Card,
CardContent,
CardDescription,
CardFooter,
CardHeader,
CardTitle,
ColineSiteProvider,
EmptyState,
SegmentedControl,
Separator,
Tabs,
TabsContent,
TabsList,
TabsTrigger,
type ColineSiteTheme,
} from "@colineapp/ui";
import { LiquidGlass } from "@colineapp/liquid-glass/react";
import "@colineapp/ui/styles.css";
import "@colineapp/liquid-glass/styles.css";
import "./app.css";
import { EXAMPLES, INSTALL, NPM_URL, PACKAGE, SITE_URL, SOURCE_URL, VERSION } from "./api";
import { CodeBlock, CopyButton, InstallCommand } from "./code";
import { Playground } from "./playground";
import { Reference, Rules } from "./reference";
import { GlassCard, GlassDialog, GlassMenu, GlassSearch, GlassTabs, GlassToolbar } from "./showcase";
import { Stage, type BackdropKind } from "./stage";
// The @colineapp/liquid-glass site: the page chrome is Coline's own
// components (@colineapp/ui); everything made of glass is the package,
// installed from npm like anyone else would. app.config.ts lists the plain-text
// docs for agents and the two tools agents in the browser can call.
const ACCENT = "#5b5bd6";
const THEME_KEY = "liquid-glass-theme";
const example = (id: string) => EXAMPLES.find((item) => item.id === id)?.code ?? "";
const NAV = [
{ href: "#playground", label: "Playground" },
{ href: "#components", label: "Components" },
{ href: "#install", label: "Install" },
{ href: "#reference", label: "Reference" },
{ href: "#agents", label: "For agents" },
];
function readTheme(): ColineSiteTheme {
try {
const saved = localStorage.getItem(THEME_KEY);
return saved === "light" || saved === "dark" ? saved : "system";
} catch {
return "system";
}
}
function Mark() {
return (
);
}
function Header({ theme, onTheme }: { theme: ColineSiteTheme; onTheme: (theme: ColineSiteTheme) => void }) {
return (
The rim refraction, light and motion of iOS 27's glass, on any rounded element. With React bindings and pill
tabs whose thumb lifts into a lens.
Press and drag the tabs, and press the search field. Everything here is the package.
Liquid Glass for the web
{children}
/react. Import the stylesheet once.>}>
liquid-glass.reference looks up
any option, and liquid-glass.snippet writes the code for a set of options.