Skip to content

Header

A simple header widget which docks itself to the top of the parent container.

  • Focusable
  • Container

Example

The example below shows an app with a Header.

HeaderApp HeaderApp

from textual.app import App, ComposeResult
from textual.widgets import Header


class HeaderApp(App):
    def compose(self) -> ComposeResult:
        yield Header()


if __name__ == "__main__":
    app = HeaderApp()
    app.run()

Reactive Attributes

Name Type Default Description
tall bool True Whether the Header widget is displayed as tall or not. The tall variant is 3 cells tall by default. The non-tall variant is a single cell tall. This can be toggled by clicking on the header.

Messages

This widget sends no messages.

See Also