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
tabs · dart_tui
Tabs demo

TabsModel

PropertyTypeDescription
tabsList<(String, String)>Non-empty list of (label, content) records.
activeTabintIndex of the selected tab.
stylesTabsStylesStyling for active/inactive labels, divider and content.

Keybindings

← / h, → / lPrevious / next tab
tab / shift+tabCycle tabs

Related