Function freya::prelude::Tab

source ·
pub fn Tab(__props: TabProps) -> Option<VNode>
Expand description

Clickable Tab. Usually used in combination with Tabsbar, [Link] and [ActivableRoute].

§Styling

Inherits the TabTheme theme.

§Example

fn app() -> Element {
    rsx!(
        Tabsbar {
            Tab {
                label {
                    "Home"
                }
            }
            Link {
                to: Route::Settings,
                Tab {
                    label {
                        "Go to Settings"
                    }
                }
            }
        }
    )
}

§Props

For details, see the props struct definition.

  • theme : Option<TabThemeWith>
  • onclick : Option<EventHandler<()>>

    Optionally handle the onclick event in the SidebarItem.