Declare UIs with Declarative API#

Panel is built on Param - a library for handling all the user-modifiable parameters, arguments, and attributes that control your code. This section contains how-to guides for using Param objects and declared dependencies to generate user interfaces with Panel.

Generate Widgets from Parameters

How to generate UIs from Parameterized classes without writing any GUI related code.

Generate Widgets from Parameters
Declare Custom Widgets

How to extend Param based UIs with custom widgets.

Declare Custom Widgets
Declare Parameter dependencies

How to leverage @param.depends to express dependencies and trigger events based on UI interactions.

Declare parameter dependencies
Create nested UIs

How to structure Parameterized classes with subobjects to create nested UIs automatically.

Create nested UIs

Examples#

Action Button

Using param.Action to define a UI with a button.

param.Action Example
Automatic Loading Indicator

Automatically enable a loading indicator for components rendered dynamically.

Loading Indicator
Param Subobjects

Using Param to express a nested UI using a hierarchy of classes.

Param Subobjects
Precedence

Using Parameter precedence to control the visibility of components.

Param Precedence