@jsvision/ui / bottomRight
Function: bottomRight()
bottomRight<
V>(view,width,height):V
Defined in: ui/src/view/dsl/stack.ts:355
Tag a view as a fixed-size stack layer pinned to the bottom-right corner.
Type Parameters
V
V extends View
Parameters
view
V
The layer view.
width
number
Fixed width in cells.
height
number
Fixed height in cells.
Returns
V
The same view, for inline chaining inside a stack(...).
Example
ts
import { View, stack, bottomRight, type DrawContext } from '@jsvision/ui';
class Panel extends View {
constructor(private readonly label: string) { super(); }
draw(ctx: DrawContext) { ctx.fill(' ', ctx.color('window')); ctx.text(1, 0, this.label); }
}
const canvas = new Panel('canvas');
const clock = new Panel('12:00');
const screen = stack(canvas, bottomRight(clock, 8, 1));