@boba-cli/help
v0.1.0-alpha.3
Published
Help components for Boba terminal UIs: key binding renderer and scrollable help bubble
Readme
@boba-cli/help
Render short or full help text from your key bindings. Ported from the Charm bubbles/help component.
import { HelpModel } from '@boba-cli/help'
const help = HelpModel.new({ width: 80 })
const text = help.view(keyMap)HelpBubble
A self-contained help bubble component with a scrollable viewport for displaying keyboard shortcuts.
import { HelpBubble } from '@boba-cli/help'
const bubble = HelpBubble.new(
true,
'Keyboard Shortcuts',
{ foreground: '#f8f8f2', background: '#6272a4' },
[
{ key: '↑/↓', description: 'Navigate' },
{ key: 'enter', description: 'Select' },
{ key: 'q', description: 'Quit' },
],
)