WebRADDocumentationExplore WebRAD ↗
WEBRAD / TECHNICAL REFERENCE

Popup

Modal or non-modal browser dialog.

WebPopupNonvisualVisual4 events

Quick start

Add Popup1 in the Designer. Use the example in a page method.

Popup1 · event
Popup1.modal = true;
Popup1.show();
// In the confirmation button event:
// Popup1.close('confirmed');
// In OnClose, read Popup1.returnValue.
  • Add dialog components in the Designer tray.
  • modal = true blocks the page when opened with show(); false allows interaction outside the dialog.
  • close('result') closes with a return value; hide() only closes.
  • OnShow tracks opening; OnHide and OnClose track closing; OnCancel tracks Escape in a modal dialog.

Inspector properties

Component options and defaults. Fields without runtime access are configured in the Inspector.

Property / sourceType and optionsDefaultRuntime access
nameName · Identitystring—name
marginMargin · SpacingOuter spacing on all four sides, in pixels. Row and column layouts include this spacing between components.number0margin
marginTopMargin top · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginTop
marginRightMargin right · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginRight
marginBottomMargin bottom · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginBottom
marginLeftMargin left · SpacingOuter spacing on this side, in pixels. Overrides the shared Margin value.number0Derived from saved propertiesmarginLeft
widthWidth · Size & positionnumber360width
heightHeight · Size & positionnumber200height
visibleVisible · Behaviorbooleantruevisible
collapseWhenHiddenCollapse when hidden · BehaviorPreserves the shared visibility contract; popup dialogs never participate in page layout.booleantruecollapseWhenHidden
enabledEnabled · Behaviorbooleantrueenabled
containerModeContainer layout · Children layoutenumfixed align-to-parent row column"fixed"Inspector / configuration
containerPaddingTopPadding top · Children layoutnumber0Inspector / configuration
containerPaddingRightPadding right · Children layoutnumber0Inspector / configuration
containerPaddingBottomPadding bottom · Children layoutnumber0Inspector / configuration
containerPaddingLeftPadding left · Children layoutnumber0Inspector / configuration
containerGapGap · Children layoutnumber0Inspector / configuration
containerWrapWrap · Children layoutbooleanfalseInspector / configuration
containerJustifyContentJustify content · Children layoutenumstart center end space-between space-around"start"Inspector / configuration
containerAlignItemsDefault alignment · Children layoutDefault cross-axis alignment for children. Each child can override it with Item alignment.enumstart center end stretch"start"Inspector / configuration
modalModal · BehaviorWhen opened, prevents interaction with the page while the popup is visible.booleantruemodal
currentRowBindingsCurrent row · DataBind writable visual values to fields of this repeated row.current-row-bindingsEditor: current-row-bindings[]currentRowBindings

API in code

MemberSignatureAccess
modalmodal: boolean;Read and write
openreadonly open: boolean;Read-only
returnValuereturnValue: string;Read and write

show

method
show(): void;
Example
Popup1.show
Popup1.show();

hide

method
hide(): void;
Example
Popup1.hide
Popup1.hide();

close

method
close(returnValue?: string): void;
Example
Popup1.close
Popup1.close('confirmed');
Inherited members (25)
MemberSignatureAccess
currentRowBindingscurrentRowBindings: readonly WebCurrentRowBinding[];Read and write
elementreadonly element: TElement;Read-only
idreadonly id: string;Read-only
namereadonly name: string;Read-only
visiblevisible: boolean;Read and write
collapseWhenHiddencollapseWhenHidden: boolean;Read and write
enabledenabled: boolean;Read and write
xx: number;Read and write
yy: number;Read and write
widthwidth: number;Read and write
heightheight: number;Read and write
marginOuter spacing on all four sides, in pixels.margin: number;Read and write
marginTopmarginTop: number;Read and write
marginRightmarginRight: number;Read and write
marginBottommarginBottom: number;Read and write
marginLeftmarginLeft: number;Read and write
alignSelfalignSelf: RuntimeLayoutAlignSelf;Read and write
tabIndextabIndex: number;Read and write
backgroundColorbackgroundColor: string;Read and write
colorcolor: string;Read and write
borderColorborderColor: string;Read and write

focus

method
focus(options?: FocusOptions): void;

bindEvent

method
bindEvent(eventName: string, handler: WebComponentEventHandler<this> | null): () => void;

emit

method
emit(eventName: string, detail?: unknown): boolean;

dispose

method
dispose(): void;

Events

Link methods in Interaction. How to use events.

OnShow

Standard event (Event).

Signature and example
Interaction → OnShow
import type { WebPopup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async Popup1Show(
    sender: WebPopup,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnHide

Standard event (Event).

Signature and example
Interaction → OnHide
import type { WebPopup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async Popup1Hide(
    sender: WebPopup,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnClose

Standard event (Event).

Signature and example
Interaction → OnClose
import type { WebPopup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async Popup1Close(
    sender: WebPopup,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}

OnCancel

Standard event (Event).

Signature and example
Interaction → OnCancel
import type { WebPopup } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async Popup1Cancel(
    sender: WebPopup,
    event: Event,
  ): Promise<void> {
    console.log(sender.name, event.type);
  }
}
WebRAD · Atentor · Read in Markdown
Source code: 6a562bda75a0 (with local changes) · November 7, 2026

Search documentation

Type to search APIs, components, and events.