15 lines
521 B
Python
15 lines
521 B
Python
from textual.app import App, ComposeResult
|
|
from textual.widgets import Markdown, TabbedContent, TabPane
|
|
|
|
class TabbedApp(App):
|
|
def compose(self) -> ComposeResult:
|
|
with TabbedContent(initial="tab1"):
|
|
with TabPane("First Tab", id="tab1"):
|
|
yield Markdown("This is the content of the first tab.")
|
|
with TabPane("Second Tab", id="tab2"):
|
|
yield Markdown("This is the content of the second tab.")
|
|
|
|
if __name__ == "__main__":
|
|
app = TabbedApp()
|
|
app.run()
|