mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
* api docs * more docstrings * logs * docs shakeup * fix notes, added intro to all apis * Remove defaults to * add note to events * note * use fira code
74 lines
1010 B
Markdown
74 lines
1010 B
Markdown
# Widget
|
|
|
|
!!! tip "Added in version x.y.z"
|
|
|
|
Widget description.
|
|
|
|
- [ ] Focusable
|
|
- [ ] Container
|
|
|
|
|
|
## Example
|
|
|
|
Example app showing the widget:
|
|
|
|
=== "Output"
|
|
|
|
```{.textual path="docs/examples/widgets/checkbox.py"}
|
|
```
|
|
|
|
=== "checkbox.py"
|
|
|
|
```python
|
|
--8<-- "docs/examples/widgets/checkbox.py"
|
|
```
|
|
|
|
=== "checkbox.css"
|
|
|
|
```sass
|
|
--8<-- "docs/examples/widgets/checkbox.css"
|
|
```
|
|
|
|
|
|
## Reactive attributes
|
|
|
|
|
|
## Bindings
|
|
|
|
The WIDGET widget defines the following bindings:
|
|
|
|
::: textual.widgets.WIDGET.BINDINGS
|
|
options:
|
|
show_root_heading: false
|
|
show_root_toc_entry: false
|
|
|
|
|
|
## Component classes
|
|
|
|
The WIDGET widget provides the following component classes:
|
|
|
|
::: textual.widget.WIDGET.COMPONENT_CLASSES
|
|
options:
|
|
show_root_heading: false
|
|
show_root_toc_entry: false
|
|
|
|
|
|
## Additional notes
|
|
|
|
- Did you know this?
|
|
- Another pro tip.
|
|
|
|
|
|
## See also
|
|
|
|
- Another related API.
|
|
- Something else useful.
|
|
|
|
|
|
---
|
|
|
|
|
|
::: textual.widgets.WIDGET
|
|
options:
|
|
heading_level: 2
|