core/tabview/tab.go

Functions Structs

Functions

func String

String returns a human-readable name for the tab position.

func (p TabPosition) String() string {
	switch p {
	case Top:
		return positionTop
	case Bottom:
		return positionBottom
	default:
		return positionUnknown
	}
}

Structs

type Tab struct

Tab represents a single tab with a label, content widget, and options.

type Tab struct {
	// Label is the display text shown in the tab bar.
	Label	string

	// Content is the widget displayed when this tab is selected.
	// If nil, the tab area is empty when selected.
	Content	widget.Widget

	// Closeable enables the close button for this specific tab.
	// This overrides the widget-level closeable setting when true.
	Closeable	bool

	// Disabled prevents the tab from being selected.
	Disabled	bool
}