Home Explore Blog CI



docker

content/reference/api/extensions-sdk/Dialog.md
33857396af908c5491d5bc46f76634b3668c1a1b253dbb0e00000003000003ad
---
title: "Interface: Dialog"
description: Docker extension API reference
keywords: Docker, extensions, sdk, API, reference
aliases:
 - /desktop/extensions-sdk/dev/api/reference/interfaces/Dialog/
 - /extensions/extensions-sdk/dev/api/reference/interfaces/Dialog/
---

Allows opening native dialog boxes.

**`Since`**

0.2.3

## Methods

### showOpenDialog

▸ **showOpenDialog**(`dialogProperties`): `Promise`<[`OpenDialogResult`](OpenDialogResult.md)\>

Display a native open dialog. Lets you select a file or a folder.

```typescript
ddClient.desktopUI.dialog.showOpenDialog({properties: ['openFile']});
```

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `dialogProperties` | `any` | Properties to specify the open dialog behaviour, see https://www.electronjs.org/docs/latest/api/dialog#dialogshowopendialogbrowserwindow-options. |

#### Returns

`Promise`<[`OpenDialogResult`](OpenDialogResult.md)\>

Chunks
f504ccf8 (1st chunk of `content/reference/api/extensions-sdk/Dialog.md`)
Title: Docker Extension API: Dialog Interface - showOpenDialog Method
Summary
This section describes the `showOpenDialog` method within the `Dialog` interface of the Docker Extension API. This method allows extensions to display a native "open" dialog box, enabling users to select files or folders. It takes `dialogProperties` as a parameter, which defines the behavior of the dialog (referencing Electron's dialog options). The method returns a Promise that resolves to an `OpenDialogResult` object.