Documentation
¶
Overview ¶
Package appbar contains Material 3 Top App Bar components.
Reference: [Top App Bar](https://m3.material.io/components/top-app-bar/overview) Specs: [Top App Bar Specs](https://m3.material.io/components/top-app-bar/specs)
Index ¶
- Variables
- type Composable
- func CenterAlignedTopAppBar(title Composable, options ...TopAppBarOption) Composable
- func LargeTopAppBar(title Composable, options ...TopAppBarOption) Composable
- func MediumTopAppBar(title Composable, options ...TopAppBarOption) Composable
- func SingleRowTopAppBar(modifier Modifier, title Composable, navigationIcon Composable, ...) Composable
- func TopAppBar(title Composable, options ...TopAppBarOption) Composable
- func TwoRowsTopAppBar(modifier Modifier, title Composable, titleBottomPadding int, maxHeight int, ...) Composable
- type Composer
- type Modifier
- type TopAppBarColors
- type TopAppBarOption
- type TopAppBarOptions
Constants ¶
This section is empty.
Variables ¶
var EmptyModifier = modifier.EmptyModifier
var TopAppBarDefaults = topAppBarDefaults{}
TopAppBarDefaults holds the default values for TopAppBar.
Functions ¶
This section is empty.
Types ¶
type Composable ¶
type Composable = api.Composable
func CenterAlignedTopAppBar ¶
func CenterAlignedTopAppBar( title Composable, options ...TopAppBarOption, ) Composable
CenterAlignedTopAppBar displays information and actions at the top of a screen. The title is centered horizontally.
func LargeTopAppBar ¶
func LargeTopAppBar( title Composable, options ...TopAppBarOption, ) Composable
LargeTopAppBar displays information and actions at the top of a screen. It has the largest height.
func MediumTopAppBar ¶
func MediumTopAppBar( title Composable, options ...TopAppBarOption, ) Composable
MediumTopAppBar displays information and actions at the top of a screen. It has a larger height than SmallTopAppBar.
func SingleRowTopAppBar ¶
func SingleRowTopAppBar( modifier Modifier, title Composable, navigationIcon Composable, actions []Composable, colors TopAppBarColors, ) Composable
SingleRowTopAppBar is an internal component to layout the TopAppBar content in a single row. It is used by SmallTopAppBar and CenterAlignedTopAppBar.
func TopAppBar ¶
func TopAppBar( title Composable, options ...TopAppBarOption, ) Composable
TopAppBar displays information and actions at the top of a screen. This is equivalent to SmallTopAppBar in Material 3.
func TwoRowsTopAppBar ¶
func TwoRowsTopAppBar( modifier Modifier, title Composable, titleBottomPadding int, maxHeight int, navigationIcon Composable, actions []Composable, colors TopAppBarColors, ) Composable
TwoRowsTopAppBar is an internal component to layout Medium and Large TopAppBars.
type TopAppBarColors ¶
type TopAppBarColors struct {
ContainerColor graphics.Color
ScrolledContainerColor graphics.Color
TitleContentColor graphics.Color
ActionIconContentColor graphics.Color
}
TopAppBarColors represents the colors used by a TopAppBar in different states.
type TopAppBarOption ¶
type TopAppBarOption func(*TopAppBarOptions)
func WithActions ¶
func WithActions(actions ...Composable) TopAppBarOption
func WithColors ¶
func WithColors(colors TopAppBarColors) TopAppBarOption
func WithModifier ¶
func WithModifier(m Modifier) TopAppBarOption
func WithNavigationIcon ¶
func WithNavigationIcon(icon Composable) TopAppBarOption
type TopAppBarOptions ¶
type TopAppBarOptions struct {
Modifier Modifier
Actions []Composable
Colors TopAppBarColors
}
TopAppBarOptions configuration TopAppBarOptions configuration
func DefaultTopAppBarOptions ¶
func DefaultTopAppBarOptions(c Composer) TopAppBarOptions