Documentation
¶
Overview ¶
Package surface contains Material 3 Surface components.
Index ¶
- type Composable
- type Composer
- type Dp
- type Modifier
- type Shape
- type SurfaceOption
- func WithAlignment(alignment box.Direction) SurfaceOption
- func WithBorder(width Dp, color graphics.Color) SurfaceOption
- func WithColor(col graphics.Color) SurfaceOption
- func WithContentColor(col graphics.Color) SurfaceOption
- func WithModifier(m Modifier) SurfaceOption
- func WithShadowElevation(elevation Dp) SurfaceOption
- func WithShape(s Shape) SurfaceOption
- func WithTonalElevation(elevation Dp) SurfaceOption
- type SurfaceOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composable ¶
type Composable = api.Composable
func Surface ¶
func Surface( content Composable, options ...SurfaceOption, ) Composable
Surface is a layout composable that represents a Material surface. It handles clipping, background color, and elevation.
type SurfaceOption ¶
type SurfaceOption func(*SurfaceOptions)
func WithAlignment ¶
func WithAlignment(alignment box.Direction) SurfaceOption
func WithBorder ¶
func WithBorder(width Dp, color graphics.Color) SurfaceOption
func WithColor ¶
func WithColor(col graphics.Color) SurfaceOption
func WithContentColor ¶
func WithContentColor(col graphics.Color) SurfaceOption
func WithModifier ¶
func WithModifier(m Modifier) SurfaceOption
func WithShadowElevation ¶
func WithShadowElevation(elevation Dp) SurfaceOption
func WithShape ¶
func WithShape(s Shape) SurfaceOption
func WithTonalElevation ¶
func WithTonalElevation(elevation Dp) SurfaceOption
type SurfaceOptions ¶
type SurfaceOptions struct {
Modifier Modifier
Shape Shape
Color graphics.Color
ContentColor graphics.Color
TonalElevation Dp
ShadowElevation Dp
BorderWidth Dp
BorderColor graphics.Color
Alignment box.Direction // Optional alignment for content inside surface
}
func DefaultSurfaceOptions ¶
func DefaultSurfaceOptions() SurfaceOptions
Click to show internal directories.
Click to hide internal directories.