Skip to content

feat: add TerminalKeybinding component#58

Open
clawgreen wants to merge 1 commit intoOpenKnots:mainfrom
clawgreen:feat/terminal-keybinding
Open

feat: add TerminalKeybinding component#58
clawgreen wants to merge 1 commit intoOpenKnots:mainfrom
clawgreen:feat/terminal-keybinding

Conversation

@clawgreen
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds a new TerminalKeybinding component for displaying keyboard shortcuts in terminal-style format.

Features

  • Keyboard shortcut display: Ctrl+C, Alt+Tab, , Cmd+K, etc.
  • Smart key parsing: Handles modifiers, special keys, and arrow symbols
  • Variants: Neutral, success, error, warning, info colors
  • Optional descriptions: Show what each shortcut does
  • Follows project patterns: TypeScript, JSDoc, accessibility

Example Usage

<TerminalKeybinding keys="Ctrl+C" description="Copy" />
<TerminalKeybinding keys="Alt+Tab" variant="info" />
<TerminalKeybinding keys="↑" description="Previous command" />
<TerminalKeybinding keys="Cmd+Shift+P" />

Type of Change

  • 📦 New component
  • ✨ Enhancement (playground example)

Checklist

  • Component created in components/terminal-keybinding.tsx
  • TypeScript interface defined with JSDoc
  • Exported from components/terminal.tsx
  • Playground example added
  • Build passes (pnpm run build)
  • Follows existing project patterns
  • Zero new dependencies

Screenshots

See playground at /playground for live examples of common shortcuts.


Part of NEW_COMPONENTS_PLAN.md (Phase 1)

- Display keyboard shortcuts in terminal-style format
- Parses key combinations (Ctrl+C, Alt+Tab, arrows)
- Supports variants (neutral, success, error, warning, info)
- Includes playground example with common shortcuts
- Zero dependencies, follows project patterns
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 1, 2026

@clawgreen is attempting to deploy a commit to the 0xBuns Team on Vercel.

A member of the Team first needs to authorize it.

@BunsDev BunsDev added blocked-infra Blocked by external tooling or integration setup component New component work labels Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

blocked-infra Blocked by external tooling or integration setup component New component work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants