PANELITH DOCS Open the interactive docs ↗

Start · Panelith 0.1.0 · plain HTML edition; the interactive edition has search and live examples

Panelith

On this page 3 sections
  1. How to read these docs
  2. The split
  3. Where to go

Python declares the app, React renders it. Panelith is a framework for dashboard-style web applications written in Python alone: you describe an application as classes (which kinds of pane exist, what each shows, which commands, hotkeys and lists are offered) and a prebuilt shell, shipped inside the package, renders it. These docs are themselves a Panelith app.

How to read these docs#

class About(Pane):
    kind = "about"
    label = "About"
    glyph = "info"
    widget = "markdown"
    tip = "A markdown pane whose text came from Python"

    def initial_state(self, ctx):
        return widgets.markdown("# Hello\n\nThis text came from **Python**.\n\n- Split the canvas with `alt+shift+\\`\n- Open the command bar with `alt+shift+.`")

Tip
Everything on this screen was declared in Python: the brand, the Contents drawer, the search, the hotkeys and this page. The source of the docs app is part of the package, under panelith/docs/.

The split#

The shell is a React application compiled once and committed to the Python package as static files. The Python server serves it at / beside a small JSON API under /api/. The shell fetches a manifest, builds the launcher, the command bar and the top bar from it, and renders each open pane with a widget chosen by the pane's kind.

Your application is a Python module. It subclasses App, Pane, Command and ListSource; the server turns those classes into the manifest. Every interaction becomes a small HTTP request with an event name and a payload, and the Python handler returns a list of actions (open a pane, set a pane's state, show a toast) which the shell applies. The server can also push actions over a server-sent-events stream.

The data layer is pydantic: the manifest, every action and every request body are models in one schema module, so the two halves cannot silently disagree about shapes.

Where to go#

Section For
Start installing, running, and a first complete app in forty lines
Guide panes and state, commands and hotkeys, lists, every widget, blocks, themes, sessions and push, plugins, hosting, testing
Reference every class attribute, action, block and widget, generated from the source each time the docs start
Examples what has been built with it, each a click away

These pages are generated from Panelith's own source when the docs start; the version you are reading is in the Hotkeys overlay. Panelith was built with Claude Code: the design, scope and interface decisions are the author's, reviewed and tested on device; the agent wrote most of the code.