mirror of
https://github.com/Textualize/textual.git
synced 2025-10-17 02:38:12 +03:00
25 lines
563 B
Python
25 lines
563 B
Python
from textual.app import App, ComposeResult
|
|
from textual.widgets import Label, TabbedContent, TabPane
|
|
|
|
|
|
class TabApp(App):
|
|
CSS = """
|
|
TabPane {
|
|
border: solid blue;
|
|
}
|
|
"""
|
|
|
|
def compose(self) -> ComposeResult:
|
|
with TabbedContent():
|
|
with TabPane("Tab 1", id="tab-1"):
|
|
yield Label("hello")
|
|
yield Label("hello")
|
|
yield Label("hello")
|
|
with TabPane("Tab 2", id="tab-2"):
|
|
yield Label("world")
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app = TabApp()
|
|
app.run()
|