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 ¶
View Source
var EmptyModifier = modifier.EmptyModifier
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 Modifier) SwitchOption
type SwitchOptions ¶
type SwitchOptions struct {
Modifier Modifier
}
func DefaultSwitchOptions ¶
func DefaultSwitchOptions() SwitchOptions
Click to show internal directories.
Click to hide internal directories.