Documentation
¶
Overview ¶
Package tab contains Material 3 Tab components.
Reference: [Tabs](https://m3.material.io/components/tabs/overview) Specs: [Tabs Specs](https://m3.material.io/components/tabs/specs)
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var TabDefaults = tabDefaults{}
View Source
var TabRowDefaults = tabRowDefaults{}
TabRowDefaults holds default values for the TabRow and Tab components.
Functions ¶
This section is empty.
Types ¶
type Composable ¶
type Composable = api.Composable
func Tab ¶
func Tab( selected bool, onClick func(), content Composable, options ...TabOption, ) Composable
Tab is a single tab in a TabRow.
func TabRow ¶
func TabRow( selectedTabIndex int, content Composable, options ...TabRowOption, ) Composable
TabRow contains a row of Tabs and displays an indicator underneath the currently selected Tab.
type TabOptions ¶
type TabOptions struct {
Modifier modifier.Modifier
Selected bool
OnClick func()
Enabled bool
SelectedContentColor graphics.Color
UnselectedContentColor graphics.Color
}
TabOptions holds the configuration for Tab.
func DefaultTabOptions ¶
func DefaultTabOptions(c Composer) TabOptions
DefaultTabOptions returns the default options for Tab.
type TabRowOption ¶
type TabRowOption func(options *TabRowOptions)
func WithTabRowModifier ¶
func WithTabRowModifier(modifier modifier.Modifier) TabRowOption
type TabRowOptions ¶
type TabRowOptions struct {
Modifier modifier.Modifier
ContainerColor graphics.Color
ContentColor graphics.Color
Indicator Composable
}
TabRowOptions holds the configuration for TabRow.
func DefaultTabRowOptions ¶
func DefaultTabRowOptions() TabRowOptions
DefaultTabRowOptions returns the default options for TabRow.
Click to show internal directories.
Click to hide internal directories.