navigationdrawer

package
v0.1.76 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package navigationdrawer contains Material 3 Navigation Drawer components.

Reference: [Navigation Drawer](https://m3.material.io/components/navigation-drawer/overview) Specs: [Navigation Drawer Specs](https://m3.material.io/components/navigation-drawer/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 DismissibleNavigationDrawer

func DismissibleNavigationDrawer(
	drawerContent Composable,
	content Composable,
	options ...ModalNavigationDrawerOption,
) Composable

DismissibleNavigationDrawer uses a drawer that is usually visible but can be dismissed. When open, it sits side-by-side with the content. When closed, the content takes the full width.

func ModalNavigationDrawer

func ModalNavigationDrawer(
	drawerContent Composable,
	content Composable,
	options ...ModalNavigationDrawerOption,

) Composable

ModalNavigationDrawer implements a navigation drawer that overlays the content. It uses a generic Box layout to stack a scrim and the drawer sheet over the content.

func NavigationDrawerItem(
	selected bool,
	onClick func(),
	icon Composable,
	label Composable,
	m ui.Modifier,
) Composable

NavigationDrawerItem is a destination item within a Navigation Drawer. Material 3 Specs: - Height: 56dp - Shape: Full rounded (Stadium) or RoundedRect 100dp. - Layout: Icon (start) + Label.

func PermanentNavigationDrawer

func PermanentNavigationDrawer(
	drawerContent Composable,
	content Composable,
	modifier ui.Modifier,
) Composable

PermanentNavigationDrawer always shows the drawer. It is used for large screens (Expanded/Extra-large). The drawer is placed at the start of the content.

type Composer

type Composer = api.Composer

type ModalNavigationDrawerOption

type ModalNavigationDrawerOption func(*ModalNavigationDrawerOptions)

func WithIsOpen

func WithIsOpen(isOpen bool) ModalNavigationDrawerOption

func WithOnClose

func WithOnClose(onClose func()) ModalNavigationDrawerOption

type ModalNavigationDrawerOptions

type ModalNavigationDrawerOptions struct {
	Modifier ui.Modifier
	IsOpen   bool
	OnClose  func()
}

func DefaultModalNavigationDrawerOptions

func DefaultModalNavigationDrawerOptions() ModalNavigationDrawerOptions

Jump to

Keyboard shortcuts

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