Browser Frame
Generic browser window chrome drawn in CSS with a slot for any content.
pnpm dlx @glinui/cli@latest add browser-frameSpend
$1,240
Seats
12
Invoices
8
Installation
pnpm dlx @glinui/cli@latest add browser-frameCredits. Adapted from Magic UI (MIT, (c) Magic UI). Generic CSS chrome instead of a monolithic SVG, children slot, token colors, glass, RTL, real address text and no bundled media. Attribution details.
Prefer the package?
Usage
Improvements: generic CSS chrome drawn with tokens instead of one SVG, a children slot for real UI (the original only took image or video), real address text, glass, simple mode and no bundled media.
Modes
A titled window and an address bar window.
import { Bell, Stack } from "@phosphor-icons/react"import { BrowserFrame, IconFrame } from "@glinui/ui"
export function Demo() { return ( <div className="grid w-full max-w-3xl gap-4 md:grid-cols-2"> <BrowserFrame mode="simple" title="Release notes"> <div className="flex items-center gap-3 p-5 text-sm"> <IconFrame tone="success"><Stack aria-hidden className="size-4" /></IconFrame> Version 2.8 is live for all workspaces. </div> </BrowserFrame> <BrowserFrame url="glinui.com/docs"> <div className="flex items-center gap-3 p-5 text-sm"> <IconFrame tone="accent"><Bell aria-hidden className="size-4" /></IconFrame> Subscribe to product updates. </div> </BrowserFrame> </div> )}Accessibility
- The traffic-light dots are decorative and aria-hidden.
- The address is a real text element, and children keep their own semantics and focus order.
- The frame is a labelled group and does not use role=img, so inner content stays reachable.
ARIA Attributes
- `role=group` with `aria-label`
- Dots use `aria-hidden`
- `alt` is required when `src` is used
Reduced Motion
Static chrome with no animation.
API Reference
BrowserFrame
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
variant | SurfaceVariant | "default" | "raised" | "frosted" | No | ambient (glinr) | Surface variant. Omit to follow the ambient design style (glinr by default, plain for minimal, glass for glass). |
tone | SurfaceTone | No | neutral | Colour tone for the vocabulary variants. |
mode | "default" | "simple" | No | default | Address bar, or a centered window title only. |
url | string | No | glinui.com | Address bar text. |
title | string | No | - | Window title for simple mode. |
src / alt | string | - | - | Optional image for the viewport. alt is required with src. |
frameLabel | string | No | - | Accessible name of the frame group. |
viewportClassName | string | No | - | Classes for the content area, for example an aspect ratio. |
children | ReactNode | - | - | Any content. Wins over src. |
Source
Import directly from the package or browse the source on GitHub. Click any file to view it.
Import
import { BrowserFrame } from "@glinui/ui"Source Files
Dependencies
@glinui/uiclass-variance-authority@phosphor-icons/reactGenerated API Snapshot
Beta
Generated API Snapshot
BetaAuto-extracted from TypeScript source in packages/ui/src/components/browser-frame.tsx. This section is in beta and may lag behind hand-curated docs. Regenerate with pnpm --filter @glinui/docs api:generate.
Generated: 2026-10-08T01:41:21.546Z · Full index: /docs/api-metadata
Primary Props Type
BrowserFrameProps
BrowserFrameProps
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
frameLabel | string | No | - | Accessible name for the frame region. |
mode | "default" | "simple" | No | "default" | `default` shows an address bar, `simple` a centered window title only. |
title | string | No | - | Window title for `simple` mode. |
tone | SurfaceTone | No | - | - |
url | string | No | "glinui.com" | Text in the address bar. |
variant | SurfaceVariant | "default" | "raised" | "frosted" | No | - | Visual variant. Omit for the ambient design style (glinr: lift shell with a raised chrome strip; plain: flat bordered window). |
viewportClassName | string | No | - | Extra classes for the viewport (content) area. |