Documentation
¶
Overview ¶
Package switch contains Material 3 Switch components.
Reference: Switch(https://m3.material.io/components/switch/overview) Specs: [Switch Specs](https://m3.material.io/components/switch/specs)
Note: "switch" is a reserved keyword in Go, but package names can match keywords if not used as identifiers.
Index ¶
Constants ¶
View Source
const Material3SwitchNodeID = "Material3Switch"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Composable ¶
type Composable = api.Composable
func Switch ¶
func Switch( checked bool, onCheckedChange func(bool), options ...SwitchOption, ) Composable
Switch creates a Material3 switch (toggle).
type HandlerWrapper ¶
type HandlerWrapper struct {
Func func(bool)
}
type SwitchOption ¶
type SwitchOption func(*SwitchOptions)
func WithModifier ¶
func WithModifier(m ui.Modifier) SwitchOption
type SwitchOptions ¶
func DefaultSwitchOptions ¶
func DefaultSwitchOptions() SwitchOptions
Click to show internal directories.
Click to hide internal directories.