checkbox

package
v0.0.0-...-839ffb1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Widget

type Widget struct {
	orvyn.BaseWidget
	orvyn.BaseFocusable

	CheckKeybind key.Binding
	// contains filtered or unexported fields
}

Widget is a checkbox widget holding 2 state : Checked and Unchecked.

func New

func New(label string) *Widget

New creates and returns a new checkbox *Widget.

func (*Widget) GetMinSize

func (w *Widget) GetMinSize() orvyn.Size

func (*Widget) GetPreferredSize

func (w *Widget) GetPreferredSize() orvyn.Size

func (*Widget) IsChecked

func (w *Widget) IsChecked() bool

IsChecked returns the current state of the checkbox.

func (*Widget) Render

func (w *Widget) Render() string

func (*Widget) Resize

func (w *Widget) Resize(size orvyn.Size)

func (*Widget) SetChecked

func (w *Widget) SetChecked(checked bool)

SetChecked changes the current state of the checkbox.

func (*Widget) SetLabel

func (w *Widget) SetLabel(label string)

SetLabel changes the label associated to the checkbox.

func (*Widget) Update

func (w *Widget) Update(msg tea.Msg) tea.Cmd

Jump to

Keyboard shortcuts

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