Build Custom Components#
These How-to pages provide solutions for common tasks related to extending Panel with custom components.
Viewer
and PyComponent
#
Build custom components by combining existing components in Python.
How to build custom components that are combinations of existing components.
How to build a custom widget by subclassing PyComponent
and WidgetBase
.
Examples#
Build a custom component wrapping a bokeh plot and some widgets using the Viewer
pattern.
Build a custom component wrapping a table and some widgets using the Viewer
pattern.
ESM Components#
Build custom components in Javascript using so called ESM components, which allow you to write components that automatically sync parameter state between Python and JS. ESM components can be written in pure JavaScript, using React or using the AnyWidget specification.
ESM Components is our 2nd generation api for custom components while ReactiveHTML
is our 1st generation. We recommend using ESM Components over ReactiveHTML
.
How to specify external dependencies for ESM components and compile them into JS bundles.
How to add both JS and Python based callbacks to ESM components.
How to create panes using ESM components
How to create a custom widget using ESM components
How to create custom layouts using ESM components
How to create ESM components that render data a DataFrame.
ESM Examples#
JSComponent
Build a custom component to draw on an HTML canvas based on JSComponent
.
JSComponent
Build a custom component wrapping leaflet.js using JSComponent
.
ReactComponent
Build custom components wrapping Material UI using ReactComponent
.
ReactiveHTML
Components#
Build custom components using HTML, CSS and Javascript and without Javascript build tools.
How to create layouts using ReactiveHTML
How to style ReactiveHTML
components
How to create panes using ReactiveHTML
How to create indicators using ReactiveHTML
How to add Python and JS callbacks to ReactiveHTML
How to create input widgets using ReactiveHTML
How to create ReactiveHTML
components that render data a DataFrame.
ReactiveHTML
Examples#
Build a custom component to draw on an HTML canvas based on ReactiveHTML
.
Build a custom component wrapping leaflet.js using ReactiveHTML
.
Build custom component wrapping a Vue.js app using ReactiveHTML
.