# terminal/HostTerminalSurface (zidane-ui/terminal)

Import: `import { … } from 'zidane-ui/terminal'`. Source: [ui/src/terminal/HostTerminalSurface.tsx](https://github.com/Tahul/zidane/blob/main/ui/src/terminal/HostTerminalSurface.tsx).

## Components

### `HostTerminalSurface`

Component.

One view of one of the host's terminals, attached for as long as it is mounted.

```ts
function HostTerminalSurface(props: HostTerminalSurfaceProps): Element
```

**Parameters**

- `props` (`HostTerminalSurfaceProps`): The terminal, its scope and label, where its paths resolve, focus and the PTY's size.

**Returns** `Element`

**Props**

- `autoFocus?` (`boolean`): Take keyboard focus on mount (the user opened or picked this terminal).
- `className?` (`string`): Extra classes on the root.
- `cwd` (`string`): Where relative paths printed by the shell resolve; empty = don't link files.
- `focusSeq?` (`number`): A new value takes focus again while `autoFocus` stays on (the terminal shown on request a second time).
- `label` (`string`): The terminal's label, for "Add to chat" excerpts.
- `ptyCols` (`number`): The PTY's columns (from the host): the grid always has its size, whatever this view's container fits.
- `ptyRows` (`number`): The PTY's rows.
- `ptySeq` (`number`): `TerminalInfo.sizeSeq` of that size: a view keeps the newest, whichever route it came by.
- `scope` (`TerminalScope`): Whose terminal (handed to the app's link and chat actions).
- `serverName?` (`string | null`): The machine the terminal runs on when it is not this one: its loopback links are not this computer's.
- `terminalId` (`string`): The terminal this view attaches to.

Source: [ui/src/terminal/HostTerminalSurface.tsx:119](https://github.com/Tahul/zidane/blob/main/ui/src/terminal/HostTerminalSurface.tsx#L119)

## Interfaces

### `HostTerminalSurfaceProps`

Interface.

Props for [`HostTerminalSurface`](https://zidane.si/docs/reference/ui-terminal-host-terminal-surface.md#HostTerminalSurface).

```ts
interface HostTerminalSurfaceProps
```

**Properties**

- `autoFocus?` (`boolean`): Take keyboard focus on mount (the user opened or picked this terminal).
- `className?` (`string`): Extra classes on the root.
- `cwd` (`string`): Where relative paths printed by the shell resolve; empty = don't link files.
- `focusSeq?` (`number`): A new value takes focus again while `autoFocus` stays on (the terminal shown on request a second time).
- `label` (`string`): The terminal's label, for "Add to chat" excerpts.
- `ptyCols` (`number`): The PTY's columns (from the host): the grid always has its size, whatever this view's container fits.
- `ptyRows` (`number`): The PTY's rows.
- `ptySeq` (`number`): `TerminalInfo.sizeSeq` of that size: a view keeps the newest, whichever route it came by.
- `scope` (`TerminalScope`): Whose terminal (handed to the app's link and chat actions).
- `serverName?` (`string | null`): The machine the terminal runs on when it is not this one: its loopback links are not this computer's.
- `terminalId` (`string`): The terminal this view attaches to.

Source: [ui/src/terminal/HostTerminalSurface.tsx:77](https://github.com/Tahul/zidane/blob/main/ui/src/terminal/HostTerminalSurface.tsx#L77)
