class Button
extends Box
Re-export
import { Button } from "https://deno.land/x/tui@2.1.11/src/components/mod.ts";
Component for creating interactive button
Examples
Example 1
Example 1
new Button({
parent: tui,
label: { text: "click\nme" },
theme: {
base: crayon.bgGreen,
focused: crayon.bgLightGreen,
active: crayon.bgYellow,
},
rectangle: {
column: 1,
row: 1,
height: 5,
width: 10,
},
zIndex: 0,
});
Constructors
new
Button(options: ButtonOptions)Properties
drawnObjects: { box: BoxObject; }
label: { text: Signal<string>; align: Signal<LabelAlign>; }
subComponents: { label?: Label; }