Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/tui/src/components/mod.ts

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
import * as tui from "https://deno.land/x/tui@1.3.4/src/components/mod.ts";

Classes

Simple component that is a Box that cannot be interacted with by default

Component that can be pressed

Component that allows user to toggle input

Component that allows user to input value by selecting one from available options. If label isn't provided then first value from options will be used.

Component that creates frame border either around a component or within rectangle depending on what's specified

Component that displays text in given rectangle When rectangle's width and/or height properties are set to -1 then width and/or height are set dynamically depending on the text size.

Component that indicates progress

Component that can be assigned to other component's view property. This allows components to be drawn independently from other components. Components drawn over bounds of this component automatically adjust its offset, and when needed scrollbars are added.

Component that allows user to input number by sliding a handle

Component that can be pressed

Component that allows user to input text. It implements most important ways to manipulate inputting text e.g.:

  • Arrows - Move cursor in specified direction
  • Return – Create new line
  • Home/End - Go to the start/end of the line
  • PgUp/PgDown - Go to the start/end of the text input
  • Delete/Backspace - Delete preceding/subsequent character

Component that can be assigned to other component's view property. This allows components to be drawn independently from other components.

Functions

Default keyboard handler for {TextboxComponent}

Interfaces

Interface defining object that {ButtonComponent}'s constructor can interpret

Interface defining object that {CheckboxComponent}'s constructor can interpret

Complementary interface defining what's accessible in {CheckboxComponent} class in addition to {CheckboxComponentOptions}

Interface defining object that {ComboboxComponent}'s constructor can interpret

Complementary interface defining what's accessible in {ComboboxComponent} class in addition to {ComboboxComponentOptions}

Interface describing object that disguises itself as {Canvas} and intercepts draw function and rectangle boundaries

Interface describing object that disguises itself as {Tui} and replaces canvas with {FakeCanvas}

Complementary interface defining what's accessible in {FrameComponent} class in addition to {FrameComponentOptions}

Interface defining object that {LabelComponent}'s constructor can interpret

Interface describing positioning of label when given boundaries using rectangle

Interface defining object that {ProgressBarComponent}'s constructor can interpret

Complementary interface defining what's accessible in {ProgressBarComponent} class in addition to {ProgressBarComponentOptions}

Theme used by {ProgressBarComponent} to style itself

Interface defining object that {ScrollableView}'s constructor can interpret

Complementary interface defining what's accessible in {SliderComponent} class in addition to {SliderComponentOptions}

Theme used by {ScrollableView} to style itself

Interface defining object that {SliderComponent}'s constructor can interpret

Complementary interface defining what's accessible in {ScrollableViewComponent} class in addition to {SliderComponentOptions}

Theme used by {SliderComponent} to style itself

Interface defining object that {TableComponent}'s constructor can interpret

Object that determines text & width of a column in {TableComponent}'s headers

Theme used by {TableComponent} to style itself

Interface defining object that {TextboxComponent}'s constructor can interpret

Complementary interface defining what's accessible in {TextboxComponent} class in addition to {TextboxComponentOptions}

Interface defining object that {ViewComponent}'s constructor can interpret

Complementary interface defining what's accessible in {ViewComponent} class in addition to {ViewComponentOptions}

Type Aliases

Implementation for {ButtonComponent} class

Implementation for {CheckboxComponent} class

EventMap that {ComboboxComponent} uses

Implementation for {ComboboxComponent} class

Implementation for {FrameComponent} class

Interface defining object that {FrameComponent}'s constructor can interpret

Type that specifies structore of object that defines how frame looks like

Implementation for {LabelComponent} class

EventMap that {ProgressBarComponent} uses

Implementation for {ProgressBarComponent} class

Implementation for {ScrollableViewComponent} class

EventMap that {SliderComponent} uses

Implementation for {SliderComponent} class

Implementation for {TableComponent} class

Type that specifies structore of object that defines how table frame looks like

EventMap that {TextboxComponent} uses

Implementation for {TextboxComponent} class

Implementation for {ViewComponent} class