Skip to main content
Module

x/tui/src/components/checkbox.ts>CheckBox

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
class CheckBox
extends Button
import { CheckBox } from "https://deno.land/x/tui@2.1.4/src/components/checkbox.ts";

Component for creating interactive checkbox

Examples

Example 1

new CheckBox({
 parent: tui,
 checked: false,
 theme: {
   base: crayon.bgGreen,
   focused: crayon.bgLightGreen,
   active: crayon.bgYellow,
 },
 rectangle: {
   column: 1,
   row: 1,
   height: 1,
   width: 1,
 },
 zIndex: 0,
});

Constructors

new
CheckBox(options: CheckBoxOptions)

Properties

checked: Signal<boolean>

Methods

interact(method: "mouse" | "keyboard"): void