Index: uspace/app/uidemo/uidemo.c
===================================================================
--- uspace/app/uidemo/uidemo.c	(revision 5ecac7e2401f64a1e94fae497d05dd8464194cb5)
+++ uspace/app/uidemo/uidemo.c	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -49,4 +49,5 @@
 #include <ui/msgdialog.h>
 #include <ui/pbutton.h>
+#include <ui/promptdialog.h>
 #include <ui/resource.h>
 #include <ui/ui.h>
@@ -89,4 +90,5 @@
 static void uidemo_file_message(ui_menu_entry_t *, void *);
 static void uidemo_file_exit(ui_menu_entry_t *, void *);
+static void uidemo_edit_modify(ui_menu_entry_t *, void *);
 
 static void file_dialog_bok(ui_file_dialog_t *, void *, const char *);
@@ -98,4 +100,14 @@
 	.bcancel = file_dialog_bcancel,
 	.close = file_dialog_close
+};
+
+static void prompt_dialog_bok(ui_prompt_dialog_t *, void *, const char *);
+static void prompt_dialog_bcancel(ui_prompt_dialog_t *, void *);
+static void prompt_dialog_close(ui_prompt_dialog_t *, void *);
+
+static ui_prompt_dialog_cb_t prompt_dialog_cb = {
+	.bok = prompt_dialog_bok,
+	.bcancel = prompt_dialog_bcancel,
+	.close = prompt_dialog_close
 };
 
@@ -229,5 +241,5 @@
 }
 
-/** File/load menu entry selected.
+/** File / Load menu entry selected.
  *
  * @param mentry Menu entry
@@ -253,5 +265,5 @@
 }
 
-/** File/message menu entry selected.
+/** File / Message menu entry selected.
  *
  * @param mentry Menu entry
@@ -278,5 +290,5 @@
 }
 
-/** File/exit menu entry selected.
+/** File / Exit menu entry selected.
  *
  * @param mentry Menu entry
@@ -288,4 +300,29 @@
 
 	ui_quit(demo->ui);
+}
+
+/** Edit / Modify menu entry selected.
+ *
+ * @param mentry Menu entry
+ * @param arg Argument (demo)
+ */
+static void uidemo_edit_modify(ui_menu_entry_t *mentry, void *arg)
+{
+	ui_demo_t *demo = (ui_demo_t *) arg;
+	ui_prompt_dialog_params_t pdparams;
+	ui_prompt_dialog_t *dialog;
+	errno_t rc;
+
+	ui_prompt_dialog_params_init(&pdparams);
+	pdparams.caption = "Modify Entry Text";
+	pdparams.prompt = "Enter New Text";
+
+	rc = ui_prompt_dialog_create(demo->ui, &pdparams, &dialog);
+	if (rc != EOK) {
+		printf("Error creating message dialog.\n");
+		return;
+	}
+
+	ui_prompt_dialog_set_cb(dialog, &prompt_dialog_cb, demo);
 }
 
@@ -346,5 +383,5 @@
 }
 
-/** Message dialog close request.
+/** File dialog close request.
  *
  * @param dialog File dialog
@@ -357,4 +394,45 @@
 	(void) demo;
 	ui_file_dialog_destroy(dialog);
+}
+
+/** Prompt dialog OK button press.
+ *
+ * @param dialog Prompt dialog
+ * @param arg Argument (ui_demo_t *)
+ * @param text Submitted text
+ */
+static void prompt_dialog_bok(ui_prompt_dialog_t *dialog, void *arg,
+    const char *text)
+{
+	ui_demo_t *demo = (ui_demo_t *) arg;
+
+	ui_prompt_dialog_destroy(dialog);
+	ui_entry_set_text(demo->entry, text);
+}
+
+/** Prompt dialog cancel button press.
+ *
+ * @param dialog File dialog
+ * @param arg Argument (ui_demo_t *)
+ */
+static void prompt_dialog_bcancel(ui_prompt_dialog_t *dialog, void *arg)
+{
+	ui_demo_t *demo = (ui_demo_t *) arg;
+
+	(void) demo;
+	ui_prompt_dialog_destroy(dialog);
+}
+
+/** Prompt dialog close request.
+ *
+ * @param dialog File dialog
+ * @param arg Argument (ui_demo_t *)
+ */
+static void prompt_dialog_close(ui_prompt_dialog_t *dialog, void *arg)
+{
+	ui_demo_t *demo = (ui_demo_t *) arg;
+
+	(void) demo;
+	ui_prompt_dialog_destroy(dialog);
 }
 
@@ -405,5 +483,7 @@
 	ui_menu_entry_t *mbar;
 	ui_menu_entry_t *mfoobar;
+	ui_menu_entry_t *msep;
 	ui_menu_entry_t *mexit;
+	ui_menu_entry_t *mmodify;
 	ui_menu_entry_t *mabout;
 	errno_t rc;
@@ -499,5 +579,5 @@
 	}
 
-	rc = ui_menu_entry_sep_create(demo.mfile, &mexit);
+	rc = ui_menu_entry_sep_create(demo.mfile, &msep);
 	if (rc != EOK) {
 		printf("Error creating menu.\n");
@@ -518,4 +598,12 @@
 		return rc;
 	}
+
+	rc = ui_menu_entry_create(demo.medit, "Modify", "", &mmodify);
+	if (rc != EOK) {
+		printf("Error creating menu.\n");
+		return rc;
+	}
+
+	ui_menu_entry_set_cb(mmodify, uidemo_edit_modify, (void *) &demo);
 
 	rc = ui_menu_create(demo.mbar, "Preferences", &demo.mpreferences);
Index: uspace/lib/ui/include/types/ui/promptdialog.h
===================================================================
--- uspace/lib/ui/include/types/ui/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
+++ uspace/lib/ui/include/types/ui/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Prompt dialog
+ */
+
+#ifndef _UI_TYPES_PROMPTDIALOG_H
+#define _UI_TYPES_PROMPTDIALOG_H
+
+#include <errno.h>
+#include <io/kbd_event.h>
+#include <io/pos_event.h>
+#include <types/ui/wdecor.h>
+
+struct ui_prompt_dialog;
+typedef struct ui_prompt_dialog ui_prompt_dialog_t;
+
+/** Prompt dialog parameters */
+typedef struct {
+	/** Window caption */
+	const char *caption;
+	/** Prompt text */
+	const char *prompt;
+} ui_prompt_dialog_params_t;
+
+/** Prompt dialog callback */
+typedef struct ui_prompt_dialog_cb {
+	/** OK button was pressed */
+	void (*bok)(ui_prompt_dialog_t *, void *, const char *);
+	/** Cancel button was pressed */
+	void (*bcancel)(ui_prompt_dialog_t *, void *);
+	/** Window closure requested (e.g. via close button) */
+	void (*close)(ui_prompt_dialog_t *, void *);
+} ui_prompt_dialog_cb_t;
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/include/ui/promptdialog.h
===================================================================
--- uspace/lib/ui/include/ui/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
+++ uspace/lib/ui/include/ui/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Prompt dialog
+ */
+
+#ifndef _UI_PROMPTDIALOG_H
+#define _UI_PROMPTDIALOG_H
+
+#include <errno.h>
+#include <types/ui/promptdialog.h>
+#include <types/ui/ui.h>
+
+extern void ui_prompt_dialog_params_init(ui_prompt_dialog_params_t *);
+extern errno_t ui_prompt_dialog_create(ui_t *, ui_prompt_dialog_params_t *,
+    ui_prompt_dialog_t **);
+extern void ui_prompt_dialog_set_cb(ui_prompt_dialog_t *, ui_prompt_dialog_cb_t *,
+    void *);
+extern void ui_prompt_dialog_destroy(ui_prompt_dialog_t *);
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/meson.build
===================================================================
--- uspace/lib/ui/meson.build	(revision 5ecac7e2401f64a1e94fae497d05dd8464194cb5)
+++ uspace/lib/ui/meson.build	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -44,4 +44,5 @@
 	'src/pbutton.c',
 	'src/popup.c',
+	'src/promptdialog.c',
 	'src/rbutton.c',
 	'src/resource.c',
@@ -68,4 +69,5 @@
 	'test/pbutton.c',
 	'test/popup.c',
+	'test/promptdialog.c',
 	'test/rbutton.c',
 	'test/resource.c',
Index: uspace/lib/ui/private/promptdialog.h
===================================================================
--- uspace/lib/ui/private/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
+++ uspace/lib/ui/private/promptdialog.h	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Prompt dialog structure
+ *
+ */
+
+#ifndef _UI_PRIVATE_PROMPTDIALOG_H
+#define _UI_PRIVATE_PROMPTDIALOG_H
+
+/** Actual structure of prompt dialog.
+ *
+ * This is private to libui.
+ */
+struct ui_prompt_dialog {
+	/** Dialog window */
+	struct ui_window *window;
+	/** File name entry */
+	struct ui_entry *ename;
+	/** OK button */
+	struct ui_pbutton *bok;
+	/** Cancel button */
+	struct ui_pbutton *bcancel;
+	/** Prompt dialog callbacks */
+	struct ui_prompt_dialog_cb *cb;
+	/** Callback argument */
+	void *arg;
+};
+
+#endif
+
+/** @}
+ */
Index: uspace/lib/ui/src/promptdialog.c
===================================================================
--- uspace/lib/ui/src/promptdialog.c	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
+++ uspace/lib/ui/src/promptdialog.c	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -0,0 +1,340 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/** @addtogroup libui
+ * @{
+ */
+/**
+ * @file Prompt dialog
+ */
+
+#include <errno.h>
+#include <mem.h>
+#include <stdlib.h>
+#include <ui/entry.h>
+#include <ui/fixed.h>
+#include <ui/label.h>
+#include <ui/promptdialog.h>
+#include <ui/pbutton.h>
+#include <ui/resource.h>
+#include <ui/ui.h>
+#include <ui/window.h>
+#include "../private/promptdialog.h"
+
+static void ui_prompt_dialog_wnd_close(ui_window_t *, void *);
+
+ui_window_cb_t ui_prompt_dialog_wnd_cb = {
+	.close = ui_prompt_dialog_wnd_close
+};
+
+static void ui_prompt_dialog_bok_clicked(ui_pbutton_t *, void *);
+static void ui_prompt_dialog_bcancel_clicked(ui_pbutton_t *, void *);
+
+ui_pbutton_cb_t ui_prompt_dialog_bok_cb = {
+	.clicked = ui_prompt_dialog_bok_clicked
+};
+
+ui_pbutton_cb_t ui_prompt_dialog_bcancel_cb = {
+	.clicked = ui_prompt_dialog_bcancel_clicked
+};
+
+/** Initialize prompt dialog parameters structure.
+ *
+ * Prompt dialog parameters structure must always be initialized using
+ * this function first.
+ *
+ * @param params Prompt dialog parameters structure
+ */
+void ui_prompt_dialog_params_init(ui_prompt_dialog_params_t *params)
+{
+	memset(params, 0, sizeof(ui_prompt_dialog_params_t));
+}
+
+/** Create new prompt dialog.
+ *
+ * @param ui User interface
+ * @param params Prompt dialog parameters
+ * @param rdialog Place to store pointer to new dialog
+ * @return EOK on success or an error code
+ */
+errno_t ui_prompt_dialog_create(ui_t *ui, ui_prompt_dialog_params_t *params,
+    ui_prompt_dialog_t **rdialog)
+{
+	errno_t rc;
+	ui_prompt_dialog_t *dialog;
+	ui_window_t *window = NULL;
+	ui_wnd_params_t wparams;
+	ui_fixed_t *fixed = NULL;
+	ui_label_t *label = NULL;
+	ui_entry_t *entry = NULL;
+	ui_pbutton_t *bok = NULL;
+	ui_pbutton_t *bcancel = NULL;
+	gfx_rect_t rect;
+	ui_resource_t *ui_res;
+
+	dialog = calloc(1, sizeof(ui_prompt_dialog_t));
+	if (dialog == NULL) {
+		rc = ENOMEM;
+		goto error;
+	}
+
+	ui_wnd_params_init(&wparams);
+	wparams.caption = params->caption;
+
+	/* FIXME: Auto layout */
+	if (ui_is_textmode(ui)) {
+		wparams.rect.p0.x = 0;
+		wparams.rect.p0.y = 0;
+		wparams.rect.p1.x = 40;
+		wparams.rect.p1.y = 9;
+	} else {
+		wparams.rect.p0.x = 0;
+		wparams.rect.p0.y = 0;
+		wparams.rect.p1.x = 300;
+		wparams.rect.p1.y = 135;
+	}
+
+	rc = ui_window_create(ui, &wparams, &window);
+	if (rc != EOK)
+		goto error;
+
+	ui_window_set_cb(window, &ui_prompt_dialog_wnd_cb, dialog);
+
+	ui_res = ui_window_get_res(window);
+
+	rc = ui_fixed_create(&fixed);
+	if (rc != EOK)
+		goto error;
+
+	rc = ui_label_create(ui_res, params->prompt, &label);
+	if (rc != EOK)
+		goto error;
+
+	/* FIXME: Auto layout */
+	if (ui_is_textmode(ui)) {
+		rect.p0.x = 3;
+		rect.p0.y = 2;
+		rect.p1.x = 17;
+		rect.p1.y = 3;
+	} else {
+		rect.p0.x = 10;
+		rect.p0.y = 35;
+		rect.p1.x = 190;
+		rect.p1.y = 50;
+	}
+
+	ui_label_set_rect(label, &rect);
+
+	rc = ui_fixed_add(fixed, ui_label_ctl(label));
+	if (rc != EOK)
+		goto error;
+
+	label = NULL;
+
+	rc = ui_entry_create(window, "", &entry);
+	if (rc != EOK)
+		goto error;
+
+	/* FIXME: Auto layout */
+	if (ui_is_textmode(ui)) {
+		rect.p0.x = 3;
+		rect.p0.y = 4;
+		rect.p1.x = 37;
+		rect.p1.y = 5;
+	} else {
+		rect.p0.x = 10;
+		rect.p0.y = 55;
+		rect.p1.x = 290;
+		rect.p1.y = 80;
+	}
+
+	ui_entry_set_rect(entry, &rect);
+
+	rc = ui_fixed_add(fixed, ui_entry_ctl(entry));
+	if (rc != EOK)
+		goto error;
+
+	dialog->ename = entry;
+	entry = NULL;
+
+	rc = ui_pbutton_create(ui_res, "OK", &bok);
+	if (rc != EOK)
+		goto error;
+
+	ui_pbutton_set_cb(bok, &ui_prompt_dialog_bok_cb, dialog);
+
+	/* FIXME: Auto layout */
+	if (ui_is_textmode(ui)) {
+		rect.p0.x = 10;
+		rect.p0.y = 6;
+		rect.p1.x = 20;
+		rect.p1.y = 7;
+	} else {
+		rect.p0.x = 55;
+		rect.p0.y = 90;
+		rect.p1.x = 145;
+		rect.p1.y = 118;
+	}
+
+	ui_pbutton_set_rect(bok, &rect);
+
+	ui_pbutton_set_default(bok, true);
+
+	rc = ui_fixed_add(fixed, ui_pbutton_ctl(bok));
+	if (rc != EOK)
+		goto error;
+
+	dialog->bok = bok;
+	bok = NULL;
+
+	rc = ui_pbutton_create(ui_res, "Cancel", &bcancel);
+	if (rc != EOK)
+		goto error;
+
+	ui_pbutton_set_cb(bcancel, &ui_prompt_dialog_bcancel_cb, dialog);
+
+	/* FIXME: Auto layout */
+	if (ui_is_textmode(ui)) {
+		rect.p0.x = 22;
+		rect.p0.y = 6;
+		rect.p1.x = 32;
+		rect.p1.y = 7;
+	} else {
+		rect.p0.x = 155;
+		rect.p0.y = 90;
+		rect.p1.x = 245;
+		rect.p1.y = 118;
+	}
+
+	ui_pbutton_set_rect(bcancel, &rect);
+
+	rc = ui_fixed_add(fixed, ui_pbutton_ctl(bcancel));
+	if (rc != EOK)
+		goto error;
+
+	dialog->bcancel = bcancel;
+	bcancel = NULL;
+
+	ui_window_add(window, ui_fixed_ctl(fixed));
+	fixed = NULL;
+
+	rc = ui_window_paint(window);
+	if (rc != EOK)
+		goto error;
+
+	dialog->window = window;
+	*rdialog = dialog;
+	return EOK;
+error:
+	if (entry != NULL)
+		ui_entry_destroy(entry);
+	if (bok != NULL)
+		ui_pbutton_destroy(bok);
+	if (bcancel != NULL)
+		ui_pbutton_destroy(bcancel);
+	if (label != NULL)
+		ui_label_destroy(label);
+	if (fixed != NULL)
+		ui_fixed_destroy(fixed);
+	if (window != NULL)
+		ui_window_destroy(window);
+	if (dialog != NULL)
+		free(dialog);
+	return rc;
+}
+
+/** Destroy prompt dialog.
+ *
+ * @param dialog Prompt dialog or @c NULL
+ */
+void ui_prompt_dialog_destroy(ui_prompt_dialog_t *dialog)
+{
+	if (dialog == NULL)
+		return;
+
+	ui_window_destroy(dialog->window);
+	free(dialog);
+}
+
+/** Set mesage dialog callback.
+ *
+ * @param dialog Prompt dialog
+ * @param cb Prompt dialog callbacks
+ * @param arg Callback argument
+ */
+void ui_prompt_dialog_set_cb(ui_prompt_dialog_t *dialog, ui_prompt_dialog_cb_t *cb,
+    void *arg)
+{
+	dialog->cb = cb;
+	dialog->arg = arg;
+}
+
+/** Prompt dialog window close handler.
+ *
+ * @param window Window
+ * @param arg Argument (ui_prompt_dialog_t *)
+ */
+static void ui_prompt_dialog_wnd_close(ui_window_t *window, void *arg)
+{
+	ui_prompt_dialog_t *dialog = (ui_prompt_dialog_t *) arg;
+
+	if (dialog->cb != NULL && dialog->cb->close != NULL)
+		dialog->cb->close(dialog, dialog->arg);
+}
+
+/** Prompt dialog OK button click handler.
+ *
+ * @param pbutton Push button
+ * @param arg Argument (ui_prompt_dialog_t *)
+ */
+static void ui_prompt_dialog_bok_clicked(ui_pbutton_t *pbutton, void *arg)
+{
+	ui_prompt_dialog_t *dialog = (ui_prompt_dialog_t *) arg;
+	const char *fname;
+
+	if (dialog->cb != NULL && dialog->cb->bok != NULL) {
+		fname = ui_entry_get_text(dialog->ename);
+		dialog->cb->bok(dialog, dialog->arg, fname);
+	}
+}
+
+/** Prompt dialog cancel button click handler.
+ *
+ * @param pbutton Push button
+ * @param arg Argument (ui_prompt_dialog_t *)
+ */
+static void ui_prompt_dialog_bcancel_clicked(ui_pbutton_t *pbutton, void *arg)
+{
+	ui_prompt_dialog_t *dialog = (ui_prompt_dialog_t *) arg;
+
+	if (dialog->cb != NULL && dialog->cb->bcancel != NULL)
+		dialog->cb->bcancel(dialog, dialog->arg);
+}
+
+/** @}
+ */
Index: uspace/lib/ui/test/promptdialog.c
===================================================================
--- uspace/lib/ui/test/promptdialog.c	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
+++ uspace/lib/ui/test/promptdialog.c	(revision 80d4aea8f85a7ad122ed5c904c692db9c3c97967)
@@ -0,0 +1,185 @@
+/*
+ * Copyright (c) 2021 Jiri Svoboda
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * - Redistributions of source code must retain the above copyright
+ *   notice, this list of conditions and the following disclaimer.
+ * - Redistributions in binary form must reproduce the above copyright
+ *   notice, this list of conditions and the following disclaimer in the
+ *   documentation and/or other materials provided with the distribution.
+ * - The name of the author may not be used to endorse or promote products
+ *   derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include <pcut/pcut.h>
+#include <stdbool.h>
+#include <ui/pbutton.h>
+#include <ui/ui.h>
+#include <ui/promptdialog.h>
+#include "../private/promptdialog.h"
+#include "../private/window.h"
+
+PCUT_INIT;
+
+PCUT_TEST_SUITE(prompt_dialog);
+
+static void test_dialog_bok(ui_prompt_dialog_t *, void *, const char *);
+static void test_dialog_bcancel(ui_prompt_dialog_t *, void *);
+static void test_dialog_close(ui_prompt_dialog_t *, void *);
+
+static ui_prompt_dialog_cb_t test_prompt_dialog_cb = {
+	.bok = test_dialog_bok,
+	.bcancel = test_dialog_bcancel,
+	.close = test_dialog_close
+};
+
+static ui_prompt_dialog_cb_t dummy_prompt_dialog_cb = {
+};
+
+typedef struct {
+	bool bok;
+	const char *fname;
+	bool bcancel;
+	bool close;
+} test_cb_resp_t;
+
+/** Create and destroy prompt dialog */
+PCUT_TEST(create_destroy)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_prompt_dialog_params_t params;
+	ui_prompt_dialog_t *dialog = NULL;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_prompt_dialog_params_init(&params);
+	params.caption = "Open";
+
+	rc = ui_prompt_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	ui_prompt_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+/** ui_prompt_dialog_destroy() can take NULL argument (no-op) */
+PCUT_TEST(destroy_null)
+{
+	ui_prompt_dialog_destroy(NULL);
+}
+
+/** Button click invokes callback set via ui_prompt_dialog_set_cb() */
+PCUT_TEST(button_cb)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_prompt_dialog_params_t params;
+	ui_prompt_dialog_t *dialog = NULL;
+	test_cb_resp_t resp;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_prompt_dialog_params_init(&params);
+	params.caption = "Open";
+
+	rc = ui_prompt_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	/* OK button callback with no callbacks set */
+	ui_pbutton_clicked(dialog->bok);
+
+	/* OK button callback with callback not implemented */
+	ui_prompt_dialog_set_cb(dialog, &dummy_prompt_dialog_cb, NULL);
+	ui_pbutton_clicked(dialog->bok);
+
+	/* OK button callback with real callback set */
+	resp.bok = false;
+	ui_prompt_dialog_set_cb(dialog, &test_prompt_dialog_cb, &resp);
+	ui_pbutton_clicked(dialog->bok);
+	PCUT_ASSERT_TRUE(resp.bok);
+
+	ui_prompt_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+/** Sending window close request invokes callback set via
+ * ui_prompt_dialog_set_cb()
+ */
+PCUT_TEST(close_cb)
+{
+	errno_t rc;
+	ui_t *ui = NULL;
+	ui_prompt_dialog_params_t params;
+	ui_prompt_dialog_t *dialog = NULL;
+	test_cb_resp_t resp;
+
+	rc = ui_create_disp(NULL, &ui);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+
+	ui_prompt_dialog_params_init(&params);
+	params.caption = "Open";
+
+	rc = ui_prompt_dialog_create(ui, &params, &dialog);
+	PCUT_ASSERT_ERRNO_VAL(EOK, rc);
+	PCUT_ASSERT_NOT_NULL(dialog);
+
+	/* Button callback with no callbacks set */
+	ui_window_send_close(dialog->window);
+
+	/* Button callback with unfocus callback not implemented */
+	ui_prompt_dialog_set_cb(dialog, &dummy_prompt_dialog_cb, NULL);
+	ui_window_send_close(dialog->window);
+
+	/* Button callback with real callback set */
+	resp.close = false;
+	ui_prompt_dialog_set_cb(dialog, &test_prompt_dialog_cb, &resp);
+	ui_window_send_close(dialog->window);
+	PCUT_ASSERT_TRUE(resp.close);
+
+	ui_prompt_dialog_destroy(dialog);
+	ui_destroy(ui);
+}
+
+static void test_dialog_bok(ui_prompt_dialog_t *dialog, void *arg,
+    const char *fname)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->bok = true;
+}
+
+static void test_dialog_bcancel(ui_prompt_dialog_t *dialog, void *arg)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->bcancel = true;
+}
+
+static void test_dialog_close(ui_prompt_dialog_t *dialog, void *arg)
+{
+	test_cb_resp_t *resp = (test_cb_resp_t *) arg;
+
+	resp->close = true;
+}
+
+PCUT_EXPORT(prompt_dialog);
