Skip to main content

Type Alias: AdwDialogProps

AdwDialogProps = WidgetProps & object

Defined in: generated/jsx.ts:2608

Props for the AdwDialog widget.

Type Declaration

NameTypeDescriptionDefined in
canClose?booleanWhether the dialog can be closed. If set to FALSE, the close button, shortcuts and Dialogclose will result in AdwDialog.:close-attempt being emitted instead, and bottom sheet close swipe will be disabled. Dialogforce_close still works.generated/jsx.ts:2617
child?Gtk.Widget | nullThe child widget of the AdwDialog.generated/jsx.ts:2619
children?ReactNode-generated/jsx.ts:2678
contentHeight?numberThe height of the dialog's contents. Set it to -1 to reset it to the content's natural height. See also: Window.default-heightgenerated/jsx.ts:2627
contentWidth?numberThe width of the dialog's contents. Set it to -1 to reset it to the content's natural width. See also: Window.default-widthgenerated/jsx.ts:2635
defaultWidget?Gtk.Widget | nullThe default widget. It's activated when the user presses Enter.generated/jsx.ts:2641
focusWidget?Gtk.Widget | nullThe focus widget.generated/jsx.ts:2643
followsContentSize?booleanWhether to size content automatically. If set to TRUE, always use the content's natural size instead of AdwDialog.content-width and AdwDialog.content-height. If the content resizes, the dialog will immediately resize as well. See also: Window.resizablegenerated/jsx.ts:2653
onCloseAttempt?(self) => void | nullEmitted when the close button or shortcut is used, or Dialogclose is called while AdwDialog.can-close is set to FALSE.generated/jsx.ts:2675
onClosed?(self) => void | nullEmitted when the dialog is successfully closed.generated/jsx.ts:2677
presentationMode?Adw.DialogPresentationModeThe dialog's presentation mode. When set to ADW_DIALOG_AUTO, the dialog appears as a bottom sheet when the following condition is met: max-width: 450px or max-height: 360px, and as a floating window otherwise. Set it to ADW_DIALOG_FLOATING or ADW_DIALOG_BOTTOM_SHEET to always present it a floating window or a bottom sheet respectively, regardless of available size. Presentation mode does nothing for dialogs presented as a window.generated/jsx.ts:2667
ref?Ref<Adw.Dialog>-generated/jsx.ts:2679
title?stringThe title of the dialog.generated/jsx.ts:2669