Tabs
A tabbed view. Provide a list of (label, content) records and navigate with ←/→, h/l or Tab/Shift+Tab. Customise active/inactive labels, the divider and the content area via TabsStyles.
Install the package
Every component ships in the single dart_tui package.
$dart pub add dart_tui

TabsModel(tabs: [
('Home', 'Welcome content here'),
('Profile', 'Name: Alice\nEmail: alice@example.com'),
('Settings', 'Theme: Dark\nFont: 14px'),
]);TabsModel
| Property | Type | Description |
|---|---|---|
| tabs | List<(String, String)> | Non-empty list of (label, content) records. |
| activeTab | int | Index of the selected tab. |
| styles | TabsStyles | Styling for active/inactive labels, divider and content. |
Keybindings
← / h, → / lPrevious / next tab
tab / shift+tabCycle tabs