bottomsheet

package
v0.1.47 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package bottomsheet contains Material 3 Bottom Sheet components.

Reference: [Bottom Sheets](https://m3.material.io/components/bottom-sheets/overview) Specs: [Bottom Sheets Specs](https://m3.material.io/components/bottom-sheets/specs)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Composable

type Composable = api.Composable

func ModalBottomSheet

func ModalBottomSheet(
	sheetContent Composable,
	content Composable,
	options ...ModalBottomSheetOption,
) Composable

type Composer

type Composer = api.Composer

type ModalBottomSheetOption

type ModalBottomSheetOption func(*ModalBottomSheetOptions)

func WithContainerColor

func WithContainerColor(col graphics.Color) ModalBottomSheetOption

func WithIsOpen

func WithIsOpen(isOpen bool) ModalBottomSheetOption

WithIsOpen is useful if the parent controls the state specifically without a SheetState object, but usually SheetState is preferred for imperative show/hide. Let's align with Drawer: it uses `IsOpen` and `OnClose`.

func WithOnDismissRequest

func WithOnDismissRequest(onDismiss func()) ModalBottomSheetOption

func WithScrimColor

func WithScrimColor(col graphics.Color) ModalBottomSheetOption

func WithSheetState

func WithSheetState(state *SheetState) ModalBottomSheetOption

type ModalBottomSheetOptions

type ModalBottomSheetOptions struct {
	IsOpen           bool // Controlled by parent usually, or we can use visible state?
	OnDismissRequest func()
	SheetState       *SheetState
	ContainerColor   graphics.Color    // Will use default if not set
	ScrimColor       graphics.Color    // Will use default if not set
	Shape            token.CornerShape // Will use default if not set
	DragHandle       Composable        // Optional custom drag handle

}

func DefaultModalBottomSheetOptions

func DefaultModalBottomSheetOptions() ModalBottomSheetOptions

type SheetState

type SheetState struct {
	// contains filtered or unexported fields
}

func NewSheetState

func NewSheetState() *SheetState

func (*SheetState) Hide

func (s *SheetState) Hide()

func (*SheetState) IsVisible

func (s *SheetState) IsVisible() bool

func (*SheetState) Show

func (s *SheetState) Show()

Jump to

Keyboard shortcuts

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