navigationbar

package
v0.1.84 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package navigationbar contains Material 3 Navigation Bar components.

Reference: [Navigation Bar](https://m3.material.io/components/navigation-bar/overview) Specs: [Navigation Bar Specs](https://m3.material.io/components/navigation-bar/specs)

Index

Constants

This section is empty.

Variables

View Source
var NavigationBarDefaults = navigationBarDefaults{}

NavigationBarDefaults holds the default values for NavigationBar.

Functions

This section is empty.

Types

type Composable

type Composable = api.Composable
func NavigationBar(
	content Composable,
	options ...NavigationBarOption,
) Composable

NavigationBar displays a navigation bar at the bottom of the screen.

Material 3 Specs: - Height: 80dp - Layout: Items are equally distributed.

func NavigationBarItem(
	selected bool,
	onClick func(),
	icon Composable,
	label Composable,
	options ...NavigationBarItemOption,
) Composable

NavigationBarItem represents an item within a NavigationBar.

Material 3 Specs: - Height: Fill container (80dp). - Indicator: Pill shape (64x32dp) around icon when selected. - Label: Text below icon.

type Composer

type Composer = api.Composer
type NavigationBarColors struct {
	ContainerColor graphics.Color
	ContentColor   graphics.Color
	IndicatorColor graphics.Color
}

NavigationBarColors represents the colors used by a NavigationBar.

type NavigationBarItemOption func(*NavigationBarItemOptions)

func ItemWithModifier

func ItemWithModifier(m ui.Modifier) NavigationBarItemOption
type NavigationBarItemOptions struct {
	Modifier ui.Modifier
}

func DefaultNavigationBarItemOptions

func DefaultNavigationBarItemOptions() NavigationBarItemOptions
type NavigationBarOption func(*NavigationBarOptions)

NavigationBarOption is a function that configures a NavigationBar.

func WithContainerColor

func WithContainerColor(col graphics.Color) NavigationBarOption

func WithContentColor

func WithContentColor(col graphics.Color) NavigationBarOption

func WithHeight

func WithHeight(h unit.Dp) NavigationBarOption

func WithModifier

func WithModifier(m ui.Modifier) NavigationBarOption

func WithTonalElevation

func WithTonalElevation(e unit.Dp) NavigationBarOption
type NavigationBarOptions struct {
	Modifier       ui.Modifier
	ContainerColor graphics.Color
	ContentColor   graphics.Color
	TonalElevation unit.Dp
	Height         unit.Dp
}

NavigationBarOptions configuration

func DefaultNavigationBarOptions

func DefaultNavigationBarOptions(c Composer) NavigationBarOptions

DefaultNavigationBarOptions returns the default options.

Jump to

Keyboard shortcuts

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