Files
textual/docs/widgets/_template.md
Will McGugan f5e779c4c4 tabbed content widget (#2059)
* tabbed content widget

* TabbedContent widget and docs

* missing docs

* fix active

* doc fix

* test fix

* additional test

* test for render_str

* docstring

* changelog

* doc update

* changelog

* fix bad optimization

* Update docs/widgets/tabbed_content.md

Co-authored-by: Dave Pearson <davep@davep.org>

* fix for empty initial

* docstrings

* Update src/textual/widgets/_content_switcher.py

Co-authored-by: Dave Pearson <davep@davep.org>

* docstring

* remove log

* permit nested tabs

* renamed TabsCleared to Cleared

* added tests, fix types on click

* tests

* fix broken test

* fix for nested tabs

---------

Co-authored-by: Dave Pearson <davep@davep.org>
2023-03-18 10:38:41 +00:00

950 B

Widget

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

  • WIDGET code reference.
  • Another related API.
  • Something else useful.