Document Header widget

This commit is contained in:
Darren Burns
2022-10-04 11:43:30 +01:00
parent ec14ed25d2
commit 14af7be6fd
5 changed files with 48 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ widget. Notice how the `Footer` automatically displays the keybind.
```{.textual path="docs/examples/widgets/footer.py"}
```
=== "button.py"
=== "footer.py"
```python
--8<-- "docs/examples/widgets/footer.py"

View File

@@ -1 +1,34 @@
# Header
## Description
A simple header widget which docks itself to the top of the parent container.
## Example
The example below shows an app with a `Header`.
=== "Output"
```{.textual path="docs/examples/widgets/header.py"}
```
=== "header.py"
```python
--8<-- "docs/examples/widgets/header.py"
```
## 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
* [Header](../reference/header.md) code reference