Skip to content

Opencode Slash Menu

The opencode-like slash menu: a floating box over the input while it is live, the highlighted row tinted, the descriptions muted.

On this page

Examples

The shared grammar with the look fixed: the same as <null preset="opencode-like" />, so it reads as the opencode-like look on its own or inside a session. Every part in all eight looks is on Agent CLI.

Installation

npx knowns-ui@latest add agent-cli-opencode
For Claude Code, Cursor or Codex: installs it and wires the props to your own data.

Props

commands
{ name, args?, description? }[]
The commands that match, in order.
selected
number
Default0
The highlighted row.
rows
number
Default6
Rows shown at once; the list scrolls to keep the highlighted row in view.
onTake
(command) => void
A command was clicked.
id / label
string
Default"Commands"
The listbox id for the input that controls it, and its accessible name.
floating
boolean
Defaultfalse
Float over what is above it, as a live popup does.

When to use

When to use

  • Listing your plugin's commands in the opencode-like menu.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Opencode Slash Menu to my app and wire it to my own data.
  • I need listing your plugin's commands in the opencode-like menu. Set that up with the Knowns UI Opencode Slash Menu.
  • Which Opencode Slash Menu props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "opencode-slash-menu" }) and search_docs({ query: "opencode slash menu" }).

Need help?

Stuck on Opencode Slash Menu, or found something off? We read every message.