Skip to content

Page

A page of package tabs is one entry of Tabs: a title, an optional icon and a function which creates the content. A disabled page is shown but cannot be selected.

Tabs with pages

return tabs.Tabs(
	tabs.Page("Overview", func() core.View {
		return Text("The content of the overview page.")
	}).Icon(icons.Home),
	tabs.Page("Settings", func() core.View {
		return Text("The content of the settings page.")
	}).Icon(icons.Cog6Tooth),
	tabs.Page("Archive", func() core.View {
		return Text("Not available yet.")
	}).Disabled(true),
).InputValue(core.AutoState[int](wnd)).
	Frame(Frame{Width: L560})

Constructors

ConstructorDescription
tabs.Page(title string, body func() core.View) TPageCreates a new tab page with the given title and content body.

Methods

MethodDescription
Disabled(disabled bool) TPageMarks the page as disabled, making it visible but not selectable.
Icon(ico core.SVG) TPageSets the icon displayed next to the page title.

Related