Skip to content

API Reference / @gtkx/navigation / TabViewNavigationConfig

Type Alias: TabViewNavigationConfig ​

TabViewNavigationConfig = object

Defined in: packages/navigation/src/tab-view/types.ts:162

Props of the tab view navigator beyond the options every navigator shares.

Properties ​

defaultIcon? ​

optional defaultIcon?: TabViewIcon | null

Defined in: packages/navigation/src/tab-view/types.ts:194

Icon of tabs without an icon option.


extraDropTarget? ​

optional extraDropTarget?: TabViewExtraDropTarget | null

Defined in: packages/navigation/src/tab-view/types.ts:184

Additional content accepted by drops on tabs.


optional menuModel?: Gio.MenuModel | null

Defined in: packages/navigation/src/tab-view/types.ts:176

An existing menu model to use as the tabs' context menu. Use renderMenu to declare the menu in JSX instead.


onCreateWindow? ​

optional onCreateWindow?: () => Adw.TabView | null

Defined in: packages/navigation/src/tab-view/types.ts:188

Returns the view of a new window when a tab is dragged out of this one.

Returns ​

Adw.TabView | null


onExtraDragDrop? ​

optional onExtraDragDrop?: (route, value) => boolean

Defined in: packages/navigation/src/tab-view/types.ts:186

Handles content dropped on a tab; returns whether the drop was accepted.

Parameters ​

route ​

RouteProp<ParamListBase>

value ​

GObject.Value

Returns ​

boolean


onSetupMenu? ​

optional onSetupMenu?: (route) => void

Defined in: packages/navigation/src/tab-view/types.ts:190

Called with the tab whose context menu opens, or null when it closes, after the chosen menu action has run.

Parameters ​

route ​

RouteProp<ParamListBase> | null

Returns ​

void


overview? ​

optional overview?: TabViewOverviewConfig

Defined in: packages/navigation/src/tab-view/types.ts:174

Renders an AdwTabOverview around the view.


renderMenu? ​

optional renderMenu?: (ref) => ReactNode

Defined in: packages/navigation/src/tab-view/types.ts:182

Renders the tabs' context menu. Attach ref to a GMenu, or to any menu model element, anywhere in the returned tree; the navigator renders the tree outside the widget hierarchy and uses that model. A navigator given both renderMenu and a menuModel throws.

Parameters ​

ref ​

(menu) => void

Returns ​

ReactNode


shortcuts? ​

optional shortcuts?: Adw.TabViewShortcuts

Defined in: packages/navigation/src/tab-view/types.ts:192

Keyboard shortcuts the view handles.


tabBarAutohide? ​

optional tabBarAutohide?: boolean

Defined in: packages/navigation/src/tab-view/types.ts:168

Whether the tab bar hides with a single tab; defaults to true.


tabBarExpand? ​

optional tabBarExpand?: boolean

Defined in: packages/navigation/src/tab-view/types.ts:170

Whether tabs expand to fill the bar; defaults to true.


tabBarInverted? ​

optional tabBarInverted?: boolean

Defined in: packages/navigation/src/tab-view/types.ts:172

Whether close buttons sit at the start of tabs; defaults to false.


tabBarVisible? ​

optional tabBarVisible?: boolean

Defined in: packages/navigation/src/tab-view/types.ts:166

Whether the tab bar renders; defaults to true.


view? ​

optional view?: Adw.TabView

Defined in: packages/navigation/src/tab-view/types.ts:164

A view created before the navigator renders, such as one returned from a create-window handler.