---
title: "ui & resources | Eidos Docs"
description: "SDK signatures, permissions and behavior for ui & resources."
source: "https://docs.eidos.space/plugins/api/ui/"
lang: "en"
---

# ui & resources

Check optional UI methods before calling. exportFile accepts a leaf filename and at most 16 MiB; Lite shows a save dialog, Serve starts a download, and actions/mobile do not expose it. It needs no filesystem write permission. Lite resources require workspace file read access, resolve paths from the bound file, and render up to 12 read-only panels within the Space; nested dashboards are unsupported. Dispose mounts with the View.

Usage guide: [resources](https://docs.eidos.space/plugins/resources/). [API index](https://docs.eidos.space/plugins/api/).

Signatures, parameters and return types are generated from the SDK. Optional members are not available in every host and context.

## ResourceMount

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L109)

```ts
interface ResourceMount extends Disposable { /* members below */ }
```

### ResourceMount.refresh

Supported hosts: Lite

Reload the referenced resource.

```ts
refresh(): Promise<void>;
```

Returns: `Promise<void>`.

Related types: [Disposable](https://docs.eidos.space/plugins/api/types/#disposable).

## HostResources

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L112)

### HostResources.listViews

Supported hosts: Lite

List available file previews or saved Eidos views for a relative path.

```ts
listViews(path: string): Promise<ResourceViewInfo[]>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| path      | string | Yes      |

Returns: `Promise<ResourceViewInfo[]>`.

### HostResources.mount

Supported hosts: Lite

Mount a host-rendered read-only resource in a rectangular element.

```ts
mount(element: HTMLElement, source: ResourceSource): Promise<ResourceMount>;
```

| Parameter | Type           | Required |
| --------- | -------------- | -------- |
| element   | HTMLElement    | Yes      |
| source    | ResourceSource | Yes      |

Returns: `Promise<ResourceMount>`.

Related types: [ResourceViewInfo](https://docs.eidos.space/plugins/api/types/#resourceviewinfo), [ResourceSource](https://docs.eidos.space/plugins/api/types/#resourcesource), [ResourceMount](https://docs.eidos.space/plugins/api/ui/#resourcemount).

## OpenFileTarget

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L717)

Supported hosts: Lite Mobile

```ts
export type OpenFileTarget = "main" | "sidebar";
```

## OpenFileOptions

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L718)

### OpenFileOptions.target

Supported hosts: Lite Mobile

```ts
target?: OpenFileTarget;
```

Related types: [OpenFileTarget](https://docs.eidos.space/plugins/api/ui/#openfiletarget).

## HostUI

[Source](https://github.com/mayneyao/eidos/blob/dev/packages/plugin-sdk/src/index.ts#L722)

### HostUI.resources

Supported hosts: Lite

```ts
resources?: HostResources;
```

### HostUI.notify

Supported hosts: Lite Serve Mobile

Show a host notification.

```ts
notify(message: string): Promise<void>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| message   | string | Yes      |

Returns: `Promise<void>`.

### HostUI.exportFile

Supported hosts: Lite Serve

Ask the host to export generated bytes; cancellation is a result, not a failure.

```ts
exportFile?(request: FileExportRequest): Promise<FileExportResult>;
```

| Parameter | Type              | Required |
| --------- | ----------------- | -------- |
| request   | FileExportRequest | Yes      |

Returns: `Promise<FileExportResult>`.

### HostUI.openFileTargets

Supported hosts: Lite Mobile

Supported locations for the current contribution. Check `ui.openFileTargets?.includes("sidebar")` before passing a sidebar target. Older hosts can omit this list and ignore the second argument. Omit the options to request the main editor on those hosts.

```ts
readonly openFileTargets?: readonly OpenFileTarget[];
```

### HostUI.openFile

Supported hosts: Lite Mobile

Open an existing Space-relative file. The default target is `main`. Lite API 3.13 supports `openFile(path, { target: "sidebar" })` in standalone Views and ordinary actions. It opens the file in the right sidebar and keeps the main View active. Opening another file in the sidebar requires `workspace.files` read access.

```ts
openFile?(relativePath: string, options?: OpenFileOptions): Promise<void>;
```

| Parameter    | Type            | Required |
| ------------ | --------------- | -------- |
| relativePath | string          | Yes      |
| options      | OpenFileOptions | No       |

Returns: `Promise<void>`.

### HostUI.navigate

Supported hosts: Lite Mobile

Navigate to this plugin’s declared page View. In Lite, omitting route reuses the same contribution’s already open main page without disposing its iframe or changing its binding. Supplying any explicit route, including an empty string, creates a new binding and remounts. A different page contribution mounts normally. Stateful pages can update through existing subscriptions.

```ts
navigate?(viewId: string, route?: string): Promise<void>;
```

| Parameter | Type   | Required |
| --------- | ------ | -------- |
| viewId    | string | Yes      |
| route     | string | No       |

Returns: `Promise<void>`.

Related types: [HostResources](https://docs.eidos.space/plugins/api/ui/#hostresources), [FileExportRequest](https://docs.eidos.space/plugins/api/types/#fileexportrequest), [FileExportResult](https://docs.eidos.space/plugins/api/types/#fileexportresult), [OpenFileTarget](https://docs.eidos.space/plugins/api/ui/#openfiletarget), [OpenFileOptions](https://docs.eidos.space/plugins/api/ui/#openfileoptions).
