# Glass theme

> A translucent window over the desktop: a heavy backdrop blur, a one-pixel rim, a coral accent and quick motion. Made for command surfaces.

Page: https://uicontext.com/themes/glass

No template starts in it: it’s made for command surfaces.

It follows the reader’s light or dark setting. Its sans-serif font is Inter Variable.

## Use Glass

Apply the StyleX themes to your app’s root, or copy the roles as CSS variables or JSON for anything else.

### StyleX

```ts
import { glass, glassScheme } from "./ui/uicontext/components/themes.stylex.ts"

// every group glass sets, and the scheme it starts in
h.div.attrs(sx(...glass, glassScheme)).children(app)
```

### CSS variables

```css
/* Glass: a UiContext design language. */
:root {
	color-scheme: light dark;
	/* color */
	--color-app: light-dark(#eef0f4, #141417);
	--color-panel: light-dark(#fbfbfd, #1e1e22);
	--color-sidebar: light-dark(#e8eaef, #18181c);
	--color-raised: light-dark(#f3f4f7, #232328);
	--color-overlay: light-dark(#fdfdfe, #26262b);
	--color-hover: light-dark(#f0f1f5, #2b2b31);
	--color-selected: light-dark(#e9ebf0, #303036);
	--color-line: light-dark(#e1e3e9, #2f2f36);
	--color-line-strong: light-dark(#d4d7df, #3c3c44);
	--color-control-line: light-dark(#818592, #7f7f8b);
	--color-fg: light-dark(#1b1b1f, #f0f0f3);
	--color-muted: light-dark(#575a66, #a6a6b0);
	--color-faint: light-dark(#5f6270, #9c9ca7);
	--color-accent: light-dark(#bb2d35, #ff7a72);
	--color-accent-fg: light-dark(#ffffff, #1d0b0a);
	--color-focus-ring: light-dark(#bb2d35, #ff7a72);
	--color-danger: light-dark(#c4302b, #f87171);
	--color-warning: light-dark(#a34a0b, #fb923c);
	--color-caution: light-dark(#875c05, #facc15);
	--color-info: light-dark(#1d4ed8, #60a5fa);
	--color-success: light-dark(#13723a, #4ade80);
	--color-done: light-dark(#4f46e5, #a5b4fc);
	--color-neutral: light-dark(#66666f, #a1a1aa);
	--color-agent: light-dark(#6d3fd6, #c4b5fd);
	--color-brand: light-dark(#bb2d35, #ff7a72);
	--color-brand-fg: light-dark(#ffffff, #1d0b0a);
	/* signal */
	--signal-accent: light-dark(#bb2d35, #ff7a72);
	--signal-on-accent: light-dark(#ffffff, #1d0b0a);
	--signal-success: light-dark(#13723a, #4ade80);
	--signal-warning: light-dark(#a34a0b, #fb923c);
	--signal-danger: light-dark(#c4302b, #f87171);
	--signal-info: light-dark(#1d4ed8, #60a5fa);
	/* font */
	--font-sans: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--font-mono: "JetBrains Mono Variable", "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
	--font-serif: "Newsreader", "Newsreader Fallback", ui-serif, Georgia, Cambria, serif;
	/* type */
	--type-display-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-display-size: 30px;
	--type-display-weight: 600;
	--type-display-line-height: 36px;
	--type-display-tracking: -0.6px;
	--type-page-title-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-page-title-size: 20px;
	--type-page-title-weight: 600;
	--type-page-title-line-height: 26px;
	--type-page-title-tracking: -0.3px;
	--type-section-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-section-size: 16px;
	--type-section-weight: 600;
	--type-section-line-height: 22px;
	--type-section-tracking: -0.1px;
	--type-card-title-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-card-title-size: 14px;
	--type-card-title-weight: 600;
	--type-card-title-line-height: 20px;
	--type-card-title-tracking: 0px;
	--type-body-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-body-size: 14px;
	--type-body-weight: 400;
	--type-body-line-height: 20px;
	--type-body-tracking: 0px;
	--type-control-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-control-size: 14px;
	--type-control-weight: 500;
	--type-control-line-height: 20px;
	--type-control-tracking: 0px;
	--type-meta-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-meta-size: 12px;
	--type-meta-weight: 500;
	--type-meta-line-height: 16px;
	--type-meta-tracking: 0px;
	--type-figure-family: "Inter Variable", "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, sans-serif;
	--type-figure-size: 26px;
	--type-figure-weight: 600;
	--type-figure-line-height: 32px;
	--type-figure-tracking: -0.4px;
	--type-code-family: "JetBrains Mono Variable", "JetBrains Mono", "JetBrains Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
	--type-code-size: 12px;
	--type-code-weight: 400;
	--type-code-line-height: 18px;
	--type-code-tracking: 0px;
	/* weight */
	--weight-regular: 400;
	--weight-medium: 500;
	--weight-semibold: 600;
	--weight-bold: 700;
	/* stroke */
	--stroke-hairline: 1px;
	--stroke-control: 1px;
	/* corner */
	--corner-tag: 4px;
	--corner-control: 8px;
	--corner-card: 10px;
	--corner-popover: 12px;
	--corner-modal: 16px;
	--corner-pill: 9999px;
	/* elevation */
	--elevation-control: 0 1px 2px light-dark(rgb(20 20 30 / 0.06), rgb(0 0 0 / 0.4));
	--elevation-card: 0 0 0 1px light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.1)), 0 1px 3px light-dark(rgb(20 20 30 / 0.08), rgb(0 0 0 / 0.4));
	--elevation-raised: 0 0 0 1px light-dark(rgb(255 255 255 / 0.65), rgb(255 255 255 / 0.11)), 0 4px 14px light-dark(rgb(20 20 30 / 0.12), rgb(0 0 0 / 0.45));
	--elevation-menu: 0 0 0 1px light-dark(rgb(255 255 255 / 0.7), rgb(255 255 255 / 0.12)), 0 10px 30px light-dark(rgb(20 20 30 / 0.16), rgb(0 0 0 / 0.5));
	--elevation-modal: 0 0 0 1px light-dark(rgb(255 255 255 / 0.8), rgb(255 255 255 / 0.14)), 0 24px 60px light-dark(rgb(20 20 30 / 0.25), rgb(0 0 0 / 0.6));
	--elevation-blur: 40px;
	--elevation-opacity: 0.74;
	/* density */
	--density-row: 40px;
	--density-control: 32px;
	--density-sidebar: 220px;
	--density-header: 52px;
	--density-content: 960px;
	--density-prose: 750px;
	/* icon */
	--icon-size: 16px;
	--icon-stroke: 1.5px;
	/* motion */
	--motion-fast: 80ms;
	--motion-base: 150ms;
	--motion-slow: 250ms;
	--motion-enter: 200ms;
	--motion-exit: 150ms;
	--motion-menu: 120ms;
	--motion-modal: 180ms;
	--motion-drawer: 260ms;
	--motion-move: 200ms;
	--motion-ease: cubic-bezier(0.2, 0, 0, 1);
	--motion-ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--motion-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
	--motion-ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
	--motion-press: 0.97;
	--motion-pop: 0.96;
	--motion-shift: 4px;
}
@media (pointer: coarse) {
	:root {
		--density-row: max(40px, 44px);
		--density-control: max(32px, 44px);
	}
}
```

### Tokens (JSON)

```json
{
	"name": "glass",
	"label": "Glass",
	"scheme": "system",
	"color": {
		"app": {
			"light": "#eef0f4",
			"dark": "#141417"
		},
		"panel": {
			"light": "#fbfbfd",
			"dark": "#1e1e22"
		},
		"sidebar": {
			"light": "#e8eaef",
			"dark": "#18181c"
		},
		"raised": {
			"light": "#f3f4f7",
			"dark": "#232328"
		},
		"overlay": {
			"light": "#fdfdfe",
			"dark": "#26262b"
		},
		"hover": {
			"light": "#f0f1f5",
			"dark": "#2b2b31"
		},
		"selected": {
			"light": "#e9ebf0",
			"dark": "#303036"
		},
		"line": {
			"light": "#e1e3e9",
			"dark": "#2f2f36"
		},
		"lineStrong": {
			"light": "#d4d7df",
			"dark": "#3c3c44"
		},
		"controlLine": {
			"light": "#818592",
			"dark": "#7f7f8b"
		},
		"fg": {
			"light": "#1b1b1f",
			"dark": "#f0f0f3"
		},
		"muted": {
			"light": "#575a66",
			"dark": "#a6a6b0"
		},
		"faint": {
			"light": "#5f6270",
			"dark": "#9c9ca7"
		},
		"accent": {
			"light": "#bb2d35",
			"dark": "#ff7a72"
		},
		"accentFg": {
			"light": "#ffffff",
			"dark": "#1d0b0a"
		},
		"focusRing": {
			"light": "#bb2d35",
			"dark": "#ff7a72"
		},
		"danger": {
			"light": "#c4302b",
			"dark": "#f87171"
		},
		"warning": {
			"light": "#a34a0b",
			"dark": "#fb923c"
		},
		"caution": {
			"light": "#875c05",
			"dark": "#facc15"
		},
		"info": {
			"light": "#1d4ed8",
			"dark": "#60a5fa"
		},
		"success": {
			"light": "#13723a",
			"dark": "#4ade80"
		},
		"done": {
			"light": "#4f46e5",
			"dark": "#a5b4fc"
		},
		"neutral": {
			"light": "#66666f",
			"dark": "#a1a1aa"
		},
		"agent": {
			"light": "#6d3fd6",
			"dark": "#c4b5fd"
		},
		"brand": {
			"light": "#bb2d35",
			"dark": "#ff7a72"
		},
		"brandFg": {
			"light": "#ffffff",
			"dark": "#1d0b0a"
		}
	},
	"signal": {
		"accent": {
			"light": "#bb2d35",
			"dark": "#ff7a72"
		},
		"onAccent": {
			"light": "#ffffff",
			"dark": "#1d0b0a"
		},
		"success": {
			"light": "#13723a",
			"dark": "#4ade80"
		},
		"warning": {
			"light": "#a34a0b",
			"dark": "#fb923c"
		},
		"danger": {
			"light": "#c4302b",
			"dark": "#f87171"
		},
		"info": {
			"light": "#1d4ed8",
			"dark": "#60a5fa"
		}
	},
	"family": {
		"sans": "\"Inter Variable\", \"Inter\", \"Inter Fallback\", ui-sans-serif, system-ui, -apple-system, sans-serif",
		"mono": "\"JetBrains Mono Variable\", \"JetBrains Mono\", \"JetBrains Mono Fallback\", ui-monospace, SFMono-Regular, Menlo, monospace",
		"serif": "\"Newsreader\", \"Newsreader Fallback\", ui-serif, Georgia, Cambria, serif"
	},
	"typography": {
		"display": {
			"family": "sans",
			"size": "30px",
			"weight": "600",
			"lineHeight": "36px",
			"tracking": "-0.6px"
		},
		"pageTitle": {
			"family": "sans",
			"size": "20px",
			"weight": "600",
			"lineHeight": "26px",
			"tracking": "-0.3px"
		},
		"section": {
			"family": "sans",
			"size": "16px",
			"weight": "600",
			"lineHeight": "22px",
			"tracking": "-0.1px"
		},
		"cardTitle": {
			"family": "sans",
			"size": "14px",
			"weight": "600",
			"lineHeight": "20px",
			"tracking": "0px"
		},
		"body": {
			"family": "sans",
			"size": "14px",
			"weight": "400",
			"lineHeight": "20px",
			"tracking": "0px"
		},
		"control": {
			"family": "sans",
			"size": "14px",
			"weight": "500",
			"lineHeight": "20px",
			"tracking": "0px"
		},
		"meta": {
			"family": "sans",
			"size": "12px",
			"weight": "500",
			"lineHeight": "16px",
			"tracking": "0px"
		},
		"figure": {
			"family": "sans",
			"size": "26px",
			"weight": "600",
			"lineHeight": "32px",
			"tracking": "-0.4px"
		},
		"code": {
			"family": "mono",
			"size": "12px",
			"weight": "400",
			"lineHeight": "18px",
			"tracking": "0px"
		}
	},
	"weight": {
		"regular": "400",
		"medium": "500",
		"semibold": "600",
		"bold": "700"
	},
	"stroke": {
		"hairline": "1px",
		"control": "1px"
	},
	"corner": {
		"tag": "4px",
		"control": "8px",
		"card": "10px",
		"popover": "12px",
		"modal": "16px",
		"pill": "9999px"
	},
	"elevation": {
		"control": {
			"light": "0 1px 2px rgb(20 20 30 / 0.06)",
			"dark": "0 1px 2px rgb(0 0 0 / 0.4)"
		},
		"card": {
			"light": "0 0 0 1px rgb(255 255 255 / 0.6), 0 1px 3px rgb(20 20 30 / 0.08)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.1), 0 1px 3px rgb(0 0 0 / 0.4)"
		},
		"raised": {
			"light": "0 0 0 1px rgb(255 255 255 / 0.65), 0 4px 14px rgb(20 20 30 / 0.12)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.11), 0 4px 14px rgb(0 0 0 / 0.45)"
		},
		"menu": {
			"light": "0 0 0 1px rgb(255 255 255 / 0.7), 0 10px 30px rgb(20 20 30 / 0.16)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.12), 0 10px 30px rgb(0 0 0 / 0.5)"
		},
		"modal": {
			"light": "0 0 0 1px rgb(255 255 255 / 0.8), 0 24px 60px rgb(20 20 30 / 0.25)",
			"dark": "0 0 0 1px rgb(255 255 255 / 0.14), 0 24px 60px rgb(0 0 0 / 0.6)"
		},
		"blur": "40px",
		"opacity": "0.74"
	},
	"density": {
		"row": "40px",
		"control": "32px",
		"sidebar": "220px",
		"header": "52px",
		"content": "960px",
		"prose": "750px"
	},
	"icon": {
		"size": "16px",
		"stroke": "1.5px"
	},
	"motion": {
		"fast": "80ms",
		"base": "150ms",
		"slow": "250ms",
		"enter": "200ms",
		"exit": "150ms",
		"menu": "120ms",
		"modal": "180ms",
		"drawer": "260ms",
		"move": "200ms",
		"ease": "cubic-bezier(0.2, 0, 0, 1)",
		"easeOut": "cubic-bezier(0.22, 1, 0.36, 1)",
		"easeInOut": "cubic-bezier(0.77, 0, 0.175, 1)",
		"easeDrawer": "cubic-bezier(0.32, 0.72, 0, 1)",
		"press": "0.97",
		"pop": "0.96",
		"shift": "4px"
	}
}
```

## Other themes

- [Midnight](https://uicontext.com/themes/midnight.md): Dark-native and dense. Near-black surfaces, half-pixel lines, indigo focus and a variable sans with its own weight steps.
- [Ink](https://uicontext.com/themes/ink.md): Pure black and white. One-pixel rings instead of shadows, a single blue for focus and action, wide pages and a tall header.
- [Slate](https://uicontext.com/themes/slate.md): White cards on a cool gray canvas (a neutral one in the dark), a vivid violet, slate-tinted shadows and big tabular figures.
- [Paper](https://uicontext.com/themes/paper.md): Warm off-white paper, umber-tinted rings, a calm blue and a narrow page made for writing. Headings can switch to a serif.
- [Parchment](https://uicontext.com/themes/parchment.md): Warm parchment and terracotta. A literary serif for headings and replies, a sans for controls, generous corners and a soft paper lift.
- [Carbon](https://uicontext.com/themes/carbon.md): Carbon studio surfaces and an emerald brand. Mono for tables, IDs and queries, one-pixel borders and almost no lift.
- [Sunburst](https://uicontext.com/themes/sunburst.md): Neo-brutal and playful. Cream and butter yellows, black ink, two-pixel strokes, hard ink offsets and a grotesk with its mono.

Make your own in the [theme editor](https://uicontext.com/themes/editor.md).
