Documentation
¶
Overview ¶
Package scaffold contains Material 3 Scaffold components.
Index ¶
- type Composable
- type Composer
- type FabPosition
- type ScaffoldOption
- func WithBottomBar(c Composable) ScaffoldOption
- func WithContainerColor(col graphics.Color) ScaffoldOption
- func WithContentColor(col graphics.Color) ScaffoldOption
- func WithFloatingActionButton(c Composable) ScaffoldOption
- func WithFloatingActionButtonPosition(pos FabPosition) ScaffoldOption
- func WithModifier(m ui.Modifier) ScaffoldOption
- func WithSnackbarHost(c Composable) ScaffoldOption
- func WithTopBar(c Composable) ScaffoldOption
- type ScaffoldOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composable ¶
type Composable = api.Composable
func Scaffold ¶
func Scaffold(content Composable, options ...ScaffoldOption) Composable
Scaffold implements the basic material design visual layout structure. This component provides API to put together several material components to construct your screen, by ensuring proper layout strategy for them and collecting necessary data so these components will work together correctly.
type FabPosition ¶
type FabPosition int
const ( FabPositionCenter FabPosition = iota FabPositionEnd )
type ScaffoldOption ¶
type ScaffoldOption func(*ScaffoldOptions)
func WithBottomBar ¶
func WithBottomBar(c Composable) ScaffoldOption
WithBottomBar sets the bottom app bar.
func WithContainerColor ¶
func WithContainerColor(col graphics.Color) ScaffoldOption
WithContainerColor sets the background color of the scaffold.
func WithContentColor ¶
func WithContentColor(col graphics.Color) ScaffoldOption
WithContentColor sets the content color of the scaffold.
func WithFloatingActionButton ¶
func WithFloatingActionButton(c Composable) ScaffoldOption
WithFloatingActionButton sets the FAB.
func WithFloatingActionButtonPosition ¶
func WithFloatingActionButtonPosition(pos FabPosition) ScaffoldOption
WithFloatingActionButtonPosition sets the position of the FAB.
func WithModifier ¶
func WithModifier(m ui.Modifier) ScaffoldOption
WithModifier sets the modifier for the Scaffold.
func WithSnackbarHost ¶
func WithSnackbarHost(c Composable) ScaffoldOption
WithSnackbarHost sets the snackbar host.
type ScaffoldOptions ¶
type ScaffoldOptions struct {
Modifier ui.Modifier
TopBar Composable
BottomBar Composable
SnackbarHost Composable
FloatingActionButton Composable
FloatingActionButtonPosition FabPosition
ContainerColor graphics.Color
ContentColor graphics.Color
}
func DefaultScaffoldOptions ¶
func DefaultScaffoldOptions(c Composer) ScaffoldOptions
DefaultScaffoldOptions returns the default options for a Scaffold.