rich/docs/source/panel.rst

10 lines
421 B
ReStructuredText
Raw Normal View History

2020-03-08 18:34:56 +00:00
Panel
=====
2020-04-28 15:09:19 +00:00
To draw a border around any content, construct a :class:`~rich.panel.Panel` with any *renderable* as the first positional argument. Here's an example::
2020-03-08 18:34:56 +00:00
from rich import print
from rich.panel import Panel
print(Panel("Hello, [red]World!"))
2020-04-28 15:38:13 +00:00
You can change the style of the panel by setting the ``box`` argument to the Panel constructor. See :ref:`appendix_box` for a list of available box styles.