Skip to main content
Module

x/tui/mod.ts>Component

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
Re-export
import { Component } from "https://deno.land/x/tui@1.0.0-RC/mod.ts";

Constructors

new
Component(unnamed 0: ComponentOptions)

Type Parameters

optional
EventMap extends EventRecord = Record<never, never>

Properties

optional
rectangle: Rectangle
state

Returns current component state

readonly
style: Style

Returns current component style

theme: Theme
tui: Tui
zIndex: number

Methods

Function that's used for rendering component It's called on tui update event

interact(_method?: "keyboard" | "mouse")

Function that's used for interacting with a component It's called by keyboard and mouse control handlers

Remove component from tui and dispatch removeComponent event