radiobutton

package
v0.1.122 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package radiobutton contains Material 3 Radio Button components.

Reference: [Radio Button](https://m3.material.io/components/radio-button/overview) Specs: [Radio Button Specs](https://m3.material.io/components/radio-button/specs)

Index

Constants

View Source
const Material3RadioButtonNodeID = "Material3RadioButton"

Variables

View Source
var Defaults = radioButtonDefaults{}

Defaults contains the default values for RadioButton.

Functions

This section is empty.

Types

type Composable

type Composable = api.Composable

func RadioButton

func RadioButton(
	selected bool,
	onClick func(),
	options ...RadioButtonOption,
) Composable

RadioButton creates a Material3 radio button. RadioButton creates a Material3 radio button.

type Composer

type Composer = api.Composer

type HandlerWrapper

type HandlerWrapper struct {
	Func func()
}

type RadioButtonColors

type RadioButtonColors struct {
	SelectedColor   graphics.Color
	UnselectedColor graphics.Color
	DisabledColor   graphics.Color
}

RadioButtonColors represents the colors used by a RadioButton in different states.

func (RadioButtonColors) Color

func (c RadioButtonColors) Color(enabled, selected bool) graphics.Color

Color returns the resolved color based on state (used internally for drawing).

type RadioButtonOption

type RadioButtonOption func(*RadioButtonOptions)

func WithColors

func WithColors(colors RadioButtonColors) RadioButtonOption

func WithEnabled

func WithEnabled(enabled bool) RadioButtonOption

func WithModifier

func WithModifier(m ui.Modifier) RadioButtonOption

type RadioButtonOptions

type RadioButtonOptions struct {
	Modifier ui.Modifier
	Enabled  bool
	Colors   RadioButtonColors
}

func DefaultRadioButtonOptions

func DefaultRadioButtonOptions(c Composer) RadioButtonOptions

Jump to

Keyboard shortcuts

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