Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/tui/src/components/mod.ts>Frame

🦕 Deno module for creating Terminal User Interfaces
Go to Latest
class Frame
extends Component
import { Frame } from "https://deno.land/x/tui@2.0.0/src/components/mod.ts";

Component for creating non-interactive frames

Examples

Example 1

new Frame({
 parent: tui,
 charMap: "rounded",
 theme: {
   base: crayon.bgBlack.white,
 },
 rectangle: {
   column: 1,
   row: 1,
   height: 5,
   width: 10,
 },
 zIndex: 0,
});

If you want frame to follow component just link components rectangle as frame's rectangle.

Example 2

const box = new Box(...);

new Frame({
 ...,
 rectangle: box.rectangle,
});

Constructors

new
Frame(options: FrameOptions)

Properties

drawnObjects: { top: TextObject; bottom: TextObject; left: BoxObject; right: BoxObject; }

Methods

draw(): void