# DesktopWindowChrome

Accessible title-bar actions limited to documented Deno Desktop window operations.

[All components](https://rickylabs.github.io/netscript/design-system/components/) · [Theme builder](https://rickylabs.github.io/netscript/create/) · [Implementation source](https://github.com/rickylabs/netscript/blob/main/packages/fresh-ui/registry/components/ui/desktop-window-chrome.tsx)

## Live preview

[Open live desktop-window-chrome preview](https://rickylabs.github.io/netscript/assets/fresh-ui/preview/?component=desktop-window-chrome&theme=studio-utility)

Native actions require a desktop host. This browser preview shows the shipped surface with host actions disabled.

## Install

```bash
netscript ui:add desktop-window-chrome
```

## Usage and examples

The preview runs this JSX with the installed components. Import any composed primitives from your UI directory.

```tsx
import { useState } from 'preact/hooks';
import { DesktopWindowChrome } from '@app/components/ui/desktop-window-chrome.tsx';

export function Example() {
  const [value, setValue] = useState('standard');
  const [open, setOpen] = useState(false);
  const [notice, report] = useState('');
  return (<><div><DesktopWindowChrome disabled title="Northwind orders" /></div><p role="status">{notice}</p></>);
}
```

## Props

Generated from native `deno doc --json --private` over the shipped implementation. Compound component props retain their owning interface; native attributes pass through where declared.

| Owner | Prop | Type | Optional | Description |
| --- | --- | --- | --- | --- |
| `DesktopWindowChromeProps` | `title` | `ComponentChildren` | No | Window title or app identity. |
| `DesktopWindowChromeProps` | `leading` | `ComponentChildren` | Yes | Optional content rendered before the action group. |
| `DesktopWindowChromeProps` | `actions` | `[object Object]` | Yes | Documented native actions to render. Defaults to reload, hide, and close. |
| `DesktopWindowChromeProps` | `onAction` | `(action: DesktopWindowChromeAction) => void` | Yes | Receives the selected documented action. |
| `DesktopWindowChromeProps` | `disabled` | `boolean` | Yes | Disable every action while the host is unavailable or busy. |
| `DesktopWindowChromeProps` | `class` | `string` | Yes | Additional root class name. |

```typescript
type DesktopWindowChromeAction = "show" | "hide" | "focus" | "reload" | "close"
```

## Keyboard

No S3 keyboard contract is registered for this item. Native controls retain browser keyboard behavior.

## Tokens

No S3 token contract is registered for this item.

CSS custom properties referenced directly: `--ns-border`, `--ns-border-subtle`, `--ns-border-width`, `--ns-control-height-sm`, `--ns-control-padding-x-sm`, `--ns-destructive`, `--ns-destructive-fg`, `--ns-ease-fast`, `--ns-fg`, `--ns-focus-ring-offset`, `--ns-focus-ring-width`, `--ns-font-sans`, `--ns-leading-body`, `--ns-leading-small`, `--ns-marker`, `--ns-muted`, `--ns-muted-fg`, `--ns-primary`, `--ns-radius-control`, `--ns-ring`, `--ns-selected`, `--ns-space-10`, `--ns-space-2`, `--ns-space-3`, `--ns-space-4`, `--ns-state-disabled-opacity`, `--ns-surface`, `--ns-text-body`, `--ns-text-sm`, `--ns-text-small`, `--ns-tracking-body`, `--ns-tracking-small`, `--ns-weight-body`, `--ns-weight-strong`.

## Contract and compatibility

This registry item ships without an S3 entry. Implementation prop documentation is authoritative.
