Enhance the Style
Let's elevate the appearance of our Panel components using the power of CSS!
By employing CSS, we can finely adjust the look and feel of our wind turbine data apps, ensuring they are visually appealing and user-friendly.
:::{note} To execute the code snippets below, feel free to run them directly in the Panel documentation via the convenient green run button, within a notebook cell, or within a app.py
file served with panel serve app.py --dev
. :::
Utilize styles
With styles
, we can effortlessly style the container of a component.
Give it a try:
Feel free to experiment by adjusting:
The
border
color fromblack
toteal
.The
padding
from20px
to50px
.
Employ stylesheets
While styles
beautify the outer container, they don't directly impact the styling of the contents within the component. Here enters stylesheets
.
Give this a go:
Feel free to play with changing the background-color
from pink
to lightgray
.
:::{tip} For more insights into stylesheets
, refer to the Apply CSS how-to guide. :::
Wrapping Up
With CSS, we can refine the style of our Panel components, ensuring they're visually appealing and provide a delightful user experience.