pub fn tabs<F>(args: TabsArgs, state: Arc<RwLock<TabsState>>, scope_config: F)
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. SeeTabsArgs
.state
: Shared state (typicallyArc<RwLock<TabsState>>
) used to read and update the active tab and animation progress.scope_config
: A closure that receives aTabsScope
which should be used to register each tab viascope.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
.