Home Explore Blog CI



docker

1st chunk of `content/reference/api/extensions-sdk/Dialog.md`
f504ccf87cb41d7cfba54c4f055dc02a575c2aae26c1db5500000001000003ad
---
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)\>

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.