WebRADDocumentationExplore WebRAD ↗
WEBRAD / TECHNICAL REFERENCE

Panel

Container with a background, borders, image, and progress outline.

WebPanelContainersVisual4 events

Quick start

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

Panel1 · event
Panel1.caption = 'Processing';
Panel1.backgroundImage = 'assets/imported/background.jpg';
Panel1.backgroundSize = 'cover';
Panel1.backgroundPosition = 'center';
Panel1.backgroundRepeat = 'no-repeat';
Panel1.progressEnabled = true;
Panel1.progressValue = 42;
Panel1.show();
  • Drag children into the Panel and choose a layout in the Inspector.
  • caption identifies the container for accessibility. Use a Label to display a title.
  • Background image: backgroundImage, backgroundSize, backgroundPosition, and backgroundRepeat.
  • The progress outline appears with progressEnabled = true and progressValue between 0 and 100, excluding the endpoints.
  • To overlay content, use placement = 'floating' and configure anchors.

More examples

Progress outline and background image
Progress outline and background image
Panel1.progressEnabled = true;
Panel1.progressValue = 0; // The outline is hidden at 0 and 100.
Panel1.progressValue = 50; // Values are clamped to 0..100.
Panel1.backgroundSize = 'contain'; // cover | contain | auto | stretch
Panel1.backgroundPosition = 'center';
Panel1.backgroundRepeat = 'repeat-x'; // no-repeat | repeat | repeat-x | repeat-y
// The caption is accessible Panel metadata, not an automatically displayed title.

Inspector properties

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

Property / sourceType and optionsDefaultRuntime access
nameName · Identitystring—name
xLeft · Size & positionnumber0x
yTop · Size & positionnumber0y
widthWidth · Size & positionnumber240width
heightHeight · Size & positionA fixed aspect ratio derives height from width. Choose none to edit the saved height rules.number160heightConditional availability in the Inspector
itemWidthResponsive width · Responsive sizeFit content grows the item to its widest rendered child and preserves child intrinsic widths; minimum and maximum width remain limits.enumfixed stretch fit-content"fixed"Inspector / configuration
itemHeightResponsive height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules.enumfixed stretch fit-content"fixed"Inspector / configurationConditional availability in the Inspector
itemMinWidthMinimum width · Responsive sizenumber0Inspector / configuration
itemMaxWidthMaximum width · Responsive sizenumbernullInspector / configuration
itemMinHeightMinimum height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules.number0Inspector / configurationConditional availability in the Inspector
itemMaxHeightMaximum height · Responsive sizeA fixed aspect ratio derives height from width. Choose none to edit the saved height rules.numbernullInspector / configurationConditional availability in the Inspector
itemGrowGrow · Responsive sizenumber0Inspector / configuration
itemShrinkShrink · Responsive sizeAllows fixed and stretch flow items to yield space. Fit-content keeps its intrinsic size so its children are not compressed.booleantrueInspector / configuration
itemAlignSelfItem alignment · Responsive sizeCross-axis alignment for this item in a row or column. Auto inherits the parent alignment; responsive cross-axis stretch retains its sizing behavior.enumauto start center end stretch"auto"Inspector / configuration
itemHorizontalAnchorHorizontal anchor · Anchors & offsetsenumstart center end stretch"start"Inspector / configuration
itemVerticalAnchorVertical anchor · Anchors & offsetsenumstart center end stretch"start"Inspector / configuration
itemLeftLeft inset · Anchors & offsetsnumber0Inspector / configuration
itemRightRight inset · Anchors & offsetsnumber0Inspector / configuration
itemTopTop inset · Anchors & offsetsnumber0Inspector / configuration
itemBottomBottom inset · Anchors & offsetsnumber0Inspector / configuration
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
visibleVisible · Behaviorbooleantruevisible
collapseWhenHiddenCollapse when hidden · BehaviorRemoves the component from the layout while it is not visible.booleantruecollapseWhenHidden
enabledEnabled · Behaviorbooleantrueenabled
aspectRatioAspect ratio · Size & positionnone allows free dimensions. A fixed ratio derives height from the responsive width.enumnone 1:1 4:3 3:4 16:9 9:16"none"aspectRatio
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
captionCaption · Appearancestring""caption
placementPlacement · Floating placementFloating Panels overlay page content and move with page scrolling without consuming layout space.enumin-flow floating"in-flow"placement
floatingHorizontalAnchorFloating horizontal anchor · Floating placementenumleft center right"left"floatingHorizontalAnchorConditional availability in the Inspector
floatingVerticalAnchorFloating vertical anchor · Floating placementenumtop center bottom"top"floatingVerticalAnchorConditional availability in the Inspector
floatingZIndexFloating layer · Floating placementnumber100floatingZIndex
floatingAlignmentFloating alignment · Floating placementChoose the page edge or client origin. Responsive width/height, content sizing, limits, margins and offsets remain active. Use Stretch on both axes to fill the client area.enumnone top bottom left right client"none"floatingAlignmentConditional availability in the Inspector
progressEnabledEnable border progress · ProgressShow progress along the Panel border automatically when the value is greater than 0 and less than 100.booleanfalseprogressEnabled
progressValueProgress (%) · ProgressProgress percentage from 0 to 100. At 0 or 100 the indicator is hidden.number0progressValue
backgroundImageBackground image · AppearanceImage URL, data URL, or project asset path (assets/imported/...). Leave empty to use only the selected style.string""backgroundImage
backgroundSizeBackground size · AppearanceCover fills with cropping; contain keeps the full image; auto uses its original size; stretch fills both dimensions.enumcover contain auto stretch"cover"backgroundSize
backgroundPositionBackground position · Appearanceenumcenter top bottom left right left top right top left bottom right bottom"center"backgroundPosition
backgroundRepeatBackground repeat · Appearanceenumno-repeat repeat repeat-x repeat-y"no-repeat"backgroundRepeat
backgroundColorBackground Color · Appearancecolor"transparent"backgroundColor
borderColorBorder Color · Appearancecolor"#808080"borderColor
currentRowBindingsCurrent row · DataBind writable visual values to fields of this repeated row.current-row-bindingsEditor: current-row-bindings[]currentRowBindings

API in code

MemberSignatureAccess
aspectRatioaspectRatio: WebAspectRatio;Read and write
floatingAlignmentfloatingAlignment: WebPanelFloatingAlignment;Read and write
placementplacement: 'in-flow' | 'floating';Read and write
floatingHorizontalAnchorfloatingHorizontalAnchor: 'left' | 'center' | 'right';Read and write
floatingVerticalAnchorfloatingVerticalAnchor: 'top' | 'center' | 'bottom';Read and write
floatingZIndexfloatingZIndex: number;Read and write
captioncaption: string;Read and write
progressEnabledprogressEnabled: boolean;Read and write
progressValueprogressValue: number;Read and write
progressVisiblereadonly progressVisible: boolean;Read-only
backgroundImagebackgroundImage: string;Read and write
backgroundSizebackgroundSize: WebPanelBackgroundSize;Read and write
backgroundPositionbackgroundPosition: WebPanelBackgroundPosition;Read and write
backgroundRepeatbackgroundRepeat: WebPanelBackgroundRepeat;Read and write
Inherited members (27)
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;

show

method
show(): void;

hide

method
hide(): 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.

OnClick

Standard event (Event).

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

OnDblClick

Standard event (Event).

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

OnMouseEnter

Standard event (Event).

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

OnMouseLeave

Standard event (Event).

Signature and example
Interaction → OnMouseLeave
import type { WebPanel } from '@webrad/runtime';
// Copy this method into the page class and link it in Interaction.
class Example {
  public async Panel1MouseLeave(
    sender: WebPanel,
    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.