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

class

Panel

public sealed class Panel : Layer<Panel>, IHasBackgroundColor

A side-anchored slide-in panel (drawer) typically used for property inspectors and detail views.

Namespace
Tesserae
Inheritance
Layer<Panel> → Panel
Implements
IHasBackgroundColor

Constructors

NameDescription
PanelInitializes a new instance of this class.
Constructor
Panel
Overload
Panel(string)Initializes a new instance of this class.
Panel(IComponent)Initializes a new instance of this class.
Panel(string)
public Panel(string title = null) : this(TextBlock(title).SemiBold())

Initializes a new instance of this class.

Parameters

title string
Panel(IComponent)
public Panel(IComponent title)

Initializes a new instance of this class.

Parameters

title IComponent

Properties

NameDescription
ContentSets the content rendered inside the surface.
FooterGets or sets the footer of the component.
SizeGets or sets the size of the component.
SideGets or sets which side of the parent the component is anchored to.
CanLightDismissGets or sets a value indicating whether the surface can be dismissed by clicking outside it (light dismiss).
IsDarkGets or sets a value indicating whether the component uses the dark colour theme.
IsNonBlockingGets or sets a value indicating whether the surface is non-blocking (allows interaction with the page beneath it).
ShowCloseButtonGets or sets a value indicating whether the close button is shown.
BackgroundGets or sets the CSS background of the component.
Property
Panel.Content
public override IComponent Content { get ; set ; }

Sets the content rendered inside the surface.

Property
Panel.Footer
public IComponent Footer { get ; set ; }

Gets or sets the footer of the component.

Property
Panel.Size
public PanelSize Size { get ; set ; }

Gets or sets the size of the component.

Property
Panel.Side
public PanelSide Side { get ; set ; }

Gets or sets which side of the parent the component is anchored to.

Property
Panel.CanLightDismiss
public bool CanLightDismiss { get ; set ; }

Gets or sets a value indicating whether the surface can be dismissed by clicking outside it (light dismiss).

Property
Panel.IsDark
public bool IsDark { get ; set ; }

Gets or sets a value indicating whether the component uses the dark colour theme.

Property
Panel.IsNonBlocking
public bool IsNonBlocking { get ; set ; }

Gets or sets a value indicating whether the surface is non-blocking (allows interaction with the page beneath it).

Property
Panel.ShowCloseButton
public bool ShowCloseButton { get ; set ; }

Gets or sets a value indicating whether the close button is shown.

Property
Panel.Background
public string Background { get ; set ; }

Gets or sets the CSS background of the component.

Methods

NameDescription
ShowShows the component.
OnHideRegisters a callback invoked when the hide event fires.
HideHides the component.
HideCloseButtonHides the close button.
SetFooterSets the footer of the component.
SmallRenders the component at small size.
MediumRenders the component at medium size.
LargeRenders the component at large size.
LargeFixedRenders the component at large size with a fixed width.
ExtraLargeRenders the component at extra-large size.
FullWidthStretches the component to the full width of its parent.
FarAnchors the component to the far side of its parent.
NearAnchors the component to the near side of its parent.
LightDismissEnables light-dismiss behaviour (clicking outside the surface closes it).
NoLightDismissRemoves / disables the light dismiss on the component.
DarkApplies the dark colour scheme to the component.
NonBlockingMakes the surface non-blocking, allowing interaction with the page beneath it.
BlockingMakes the surface blocking (the default — interaction with the page beneath is prevented).
Method
Panel.Show
public override Panel Show()

Shows the component.

Method
Panel.OnHide
public Panel OnHide(OnHideHandler onHide)

Registers a callback invoked when the hide event fires.

Method
Panel.Hide
public override void Hide(Action onHidden = null)

Hides the component.

Method
Panel.HideCloseButton
public Panel HideCloseButton()

Hides the close button.

Method
Panel.SetFooter
public Panel SetFooter(IComponent footer)

Sets the footer of the component.

Method
Panel.Small
public Panel Small()

Renders the component at small size.

Method
Panel.Medium
public Panel Medium()

Renders the component at medium size.

Method
Panel.Large
public Panel Large()

Renders the component at large size.

Method
Panel.LargeFixed
public Panel LargeFixed()

Renders the component at large size with a fixed width.

Method
Panel.ExtraLarge
public Panel ExtraLarge()

Renders the component at extra-large size.

Method
Panel.FullWidth
public Panel FullWidth()

Stretches the component to the full width of its parent.

Method
Panel.Far
public Panel Far()

Anchors the component to the far side of its parent.

Method
Panel.Near
public Panel Near()

Anchors the component to the near side of its parent.

Method
Panel.LightDismiss
public Panel LightDismiss()

Enables light-dismiss behaviour (clicking outside the surface closes it).

Method
Panel.NoLightDismiss
public Panel NoLightDismiss()

Removes / disables the light dismiss on the component.

Method
Panel.Dark
public Panel Dark()

Applies the dark colour scheme to the component.

Method
Panel.NonBlocking
public Panel NonBlocking()

Makes the surface non-blocking, allowing interaction with the page beneath it.

Method
Panel.Blocking
public Panel Blocking()

Makes the surface blocking (the default — interaction with the page beneath is prevented).

Samples

This example demonstrates how to create a panel with custom content and footer, enable light dismiss, and display the panel.

See Also

© 2026 Curiosity. All rights reserved.