Banner#

Renders text in a large block font and fills it with a gradient — a splash heading for a CLI's intro screen.

Import#

TSX
import { Banner } from '@sigx/terminal';

Usage#

TSX
/** @jsxImportSource @sigx/terminal */
import { component, defineApp, Banner } from '@sigx/terminal';

const App = component(() => {
    return () => (
        <box>
            <Banner text="SIGX" preset="sigx" direction="diagonal" animate speed={1} />
        </box>
    );
});

defineApp(<App />).mount({ clearConsole: true });

Props#

PropTypeNotes
textstringrequired — the heading
colorsstring[]gradient stops (tokens or hex)
presetGradientPreseta named gradient preset
direction'horizontal' | 'vertical' | 'diagonal'gradient direction
animatebooleananimate the fill
speednumberanimation speed

The block font is 5 rows tall (BLOCK_FONT_HEIGHT); renderBlock(text) is the headless renderer.

See also#

  • Gradient — inline gradient text and the presets.
  • PixelArt — palette-mapped grids.