Display Modes¶
Control how panel-live presents your code and output using the mode attribute.
App mode (default)¶
Renders the output only — no editor, no controls. Use for embedded demos.
Editor mode¶
Shows code and output stacked vertically with a Run button. Users can edit and re-run.
Playground mode¶
Side-by-side editor and live preview. Best for exploration and experimentation.
Org mode (static code block)¶
Renders a standard syntax-highlighted code block — no <panel-live> element, no interactivity. Useful when you want to show Panel code with syntax highlighting but without live execution.
```{.panel mode="org"}
import panel as pn
pn.panel("This renders as a static code block.").servable()
```
Fence syntax¶
When to use each¶
| Scenario | Recommended Mode |
|---|---|
| Embedded demos in docs | app |
| Tutorials with editable examples | editor |
| Interactive exploration / playground | playground |
| Showcase pages | app or editor with code-visibility="collapsed" |
| Static code display (no execution) | org |