Skip to content

ShortcutBar

widgetsdisplay

ShortcutBar: a horizontal footer bar that displays quick key bindings

Installation

$ bunx termuijs add shortcut-bar

Copies the source into src/components/shortcut-bar/ and installs @termuijs/core, @termuijs/widgets.

Usage

ts
import { ShortcutBar } from '@termuijs/widgets'
ts
new ShortcutBar(items: ShortcutItem[] = [], style: Partial<Style> = {}, opts: ShortcutBarOptions = {},)

API Reference

ShortcutBar

PropTypeRequiredDescription
itemsShortcutItem[]optional
keyStylePartial<Style>optionalCustom styles for the key (e.g., fg/bg colors)
labelStylePartial<Style>optionalCustom styles for the label text
separatorstringoptionalHorizontal separator string
#display#shortcut-bar