tabs

Function tabs 

Source
pub fn tabs<F>(args: TabsArgs, state: Arc<RwLock<TabsState>>, scope_config: F)
where F: FnOnce(&mut TabsScope<'_>),
Expand description

Renders a tabs control with a row of titles and a paged content area.

ยงArguments

  • args: Configuration for indicator color and preferred sizing. See TabsArgs.
  • state: Shared state (typically Arc<RwLock<TabsState>>) used to read and update the active tab and animation progress.
  • scope_config: A closure that receives a TabsScope which should be used to register each tab via scope.child(title_closure, content_closure).

The function renders the title buttons (using button(...)) and a content container that pages horizontally between tab contents. Clicking a title will call TabsState::set_active_tab.