surface

package
v0.1.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package surface contains Material 3 Surface components.

Index

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 Composer

type Composer = api.Composer

type Dp

type Dp = unit.Dp

type Shape

type Shape = shape.Shape

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 ui.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        ui.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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL