Skip to content

Header

Header is a title-bar / panel-header component containing left-aligned text. Renders a <header> element with a Border layout and a bold Text child anchored to the west side.

This is the standalone header component, exported from @jimka/typescript-ui/component/display. The table's column-header strip (Header in @jimka/typescript-ui/component/table) is a different class with the same name; alias one of them on import when you need both: import { Header as TableHeader } from '@jimka/typescript-ui/component/table';.

Usage

typescript
import { Component } from '@jimka/typescript-ui/core';
import { VBox } from '@jimka/typescript-ui/layout';
import { Header } from '@jimka/typescript-ui/component/display';
const panel = Component({
    layoutManager: VBox(),
    components:    [Header('Settings'), content],
});

Common methods

MethodPurpose
getText()Returns the internal Text child. Use header.getText().setText(...) to update the title.

Theming

Header font size is controlled by the header.font.size token — see Theming.

See also