Style Components#

Panel provides a comprehensive system for applying themes and custom styling to components.

Theme and style pn.ui apps#

The pn.ui components are built on Material UI. They are themed with theme_config and styled with sx.

Customize Themes and Styles

How to style pn.ui components with sx, theme_config and styles.

Customize Themes and Styles
Customize the Color Palette

How to override and extend the color palette of pn.ui components.

Customize the Color Palette
Customize Typography

How to customize fonts, font sizes and text variants of pn.ui components.

Customize Typography
Control Dark Mode

How to force, toggle and customize dark mode for pn.ui components.

Control Dark Mode

How to choose a cohesive, accessible color palette for your theme.

Pick Colors
Theme Components

How to customize pn.ui components app-wide with default props, style overrides and variants.

Theme Components
Apply Branding

How to build a cohesive branded app with brand colors, fonts, logos and theme configuration.

Apply Branding
Use Icons

How to use Material icons in components, Markdown and inline text.

Use Icons
Theme Plotting Libraries

How plots automatically follow the pn.ui theme, and how to match palettes and colormaps.

Theme Plotting Libraries

Classic designs and CSS#

The guides below apply to the classic pn.widgets, pn.pane and pn.layout components and templates, which are styled through designs, CSS variables and stylesheets.

Apply a Design

How to switch between different design systems.

Apply a Design
Toggle themes

How to toggle between themes (e.g. ‘light’ and ‘dark’).

Toggling themes
Apply CSS

How to apply custom CSS styling.

Apply CSS
Customize a Design

How to customize designs and themes with CSS variables.

Customize a Design
Customize Loading Icon

How to customize the loading icon.

Customize Loading Icon
Control Visibility

How to control the visibility of a component.

Control Visibility

This section will show you how to style the most common plotting libraries for use with Panel.

Altair
../../_images/altair-logo.png

How to style an Altair plot

Style Altair Plots
ECharts
../../_images/echarts-logo.png

How to style an ECharts plot

Style Echarts Plots
Matplotlib
../../_images/matplotlib-logo.png

How to style a Matplotlib plot

Style Matplotlib Plots
Plotly
../../_images/plotly-logo.png

How to style a Plotly plot

Style Plotly Plots
Vega Lite
../../_images/vegalite-logo.png

How to style a Vega Lite plot

Style Vega Plots