Panel
Description
The Panel component creates a modal or non-modal overlay that presents contextual content, such as forms or informational messages. It is part of the Surfaces group and is typically used to display self-contained experiences without leaving the current app view. Panels support header titles, footers, content areas, and configurable behaviors like light dismiss, dark overlay, and blocking or non-blocking interactions.
Usage
Panels are instantiated using the static helper method from Tesserae.UI. They allow customization of size, panel side (near or far), and additional behaviors. Below is a minimal example of creating a panel with light dismiss capability and custom footer:
API reference
public sealed class Panel : Layer<Panel>, IHasBackgroundColorA side-anchored slide-in panel (drawer) typically used for property inspectors and detail views.
Constructors
public Panel(string title = null) : this(TextBlock(title).SemiBold())Initializes a new instance of this class.
Properties
public override IComponent Content { get ; set ; }Sets the content rendered inside the surface.
public PanelSide Side { get ; set ; }Gets or sets which side of the parent the component is anchored to.
public bool CanLightDismiss { get ; set ; }Gets or sets a value indicating whether the surface can be dismissed by clicking outside it (light dismiss).
public bool IsDark { get ; set ; }Gets or sets a value indicating whether the component uses the dark colour theme.
public bool IsNonBlocking { get ; set ; }Gets or sets a value indicating whether the surface is non-blocking (allows interaction with the page beneath it).
public bool ShowCloseButton { get ; set ; }Gets or sets a value indicating whether the close button is shown.
Methods
public Panel OnHide(OnHideHandler onHide)Registers a callback invoked when the hide event fires.
public Panel LargeFixed()Renders the component at large size with a fixed width.
public Panel FullWidth()Stretches the component to the full width of its parent.
public Panel LightDismiss()Enables light-dismiss behaviour (clicking outside the surface closes it).
public Panel NoLightDismiss()Removes / disables the light dismiss on the component.
public Panel NonBlocking()Makes the surface non-blocking, allowing interaction with the page beneath it.
Samples
Basic Panel with Footer and Light Dismiss
This example demonstrates how to create a panel with custom content and footer, enable light dismiss, and display the panel.