Skip to content
Back

Tools menuPro

Choose which tools the agent may use: grouped switches, group toggles, a filter, and connectors that ask you to sign in first.

oxyn add tools-menu
The code is part of Oxyn Pro

The preview stays free for everyone. Pro opens the code of every Pro component, screen, agent-app template, block and kit, plus the Pro CLI.

Get Pro

Rendered from Rust at build time · goes live when visible

When to use

  • The "+" is where the user adds things the text cannot carry: a file from disk, an image, a repo or URL as context, a connector (MCP server), a skill, or a mode such as Plan or Research.
  • Research across coding agents found two different jobs hiding behind one "+": attaching a file from disk, and adding context or capabilities (skills, connectors, plugins) (research notes 03: Claude Code desktop, Lovable, Zed, Verdent).
  • Consumer chat apps put modes there too (research notes 04: ChatGPT, Claude, Gemini).
  • The menu therefore has sections, search, nested submenus, and per-item states for tools that are on, need sign-in, are broken, or are not allowed right now.

When not to use

  • Prompt composer with model picker, voice input, app connections and approval request: use Chat Composer instead.
  • The model menu of an AI chat: use Model Picker instead.
  • The prompt box for an agent, in six layouts: use Composer instead.

Installation

Tools menu is part of Oxyn Pro; the preview is free. Pro items install with the oxyn CLI once your licence is signed in; until then Pro members copy the code from this page.

Terminal
oxyn add tools-menu

Usage

Dioxus · rust
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Examples

Open

Grouped tools with switches.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Closed

The tools chip in the composer.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Minimal

No search or group switches.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

Connected

Connectors already signed in.

Code Pro
The code is part of Oxyn Pro

The preview is free. Pro opens the code of every Pro component, screen and template.

Get Pro

API reference

ToolsMenu

PropTypeDefaultDescription
toolsrequiredVec<Tool>—Tools.
openbooltrueStart open.
group_togglesbooltrueGroup switches.
searchbooltrueSearch field.
on_changeEventHandler<Vec<String>>—Changed: enabled ids.
on_connectEventHandler<String>—Connect pressed for a tool that needs sign-in.

Read from the Rust signature and doc comments.

Keyboard interactions

KeyAction
TabMove through tools
EnterorSpaceToggle a tool
EscapeClose the menu

Accessibility

  • Each tool is a switch (role switch, aria-checked); groups are labelled.
  • Group buttons read “Turn all on” or “Turn all off”; changes are announced politely.
From the spec
  • Trigger: button with aria-haspopup="menu", aria-expanded, label "Add files, tools and more" (closed) / "Close menu" (open). With active items: "Add files, tools and more, 2 active".
  • Menu: menu with groups labelled by section headers; toggles are menuitemcheckbox, exclusive modes menuitemradio, submenus aria-haspopup + aria-expanded. In command variant the search is a combobox with aria-activedescendant, so focus stays in the field.
  • Each connector row's name includes status and count: "GitHub, connected, 5 tools". Status is icon + word, never colour alone.
  • Live region (polite): "3 results", "No results", "GitHub needs sign in", "Connected to Linear, found 5 tools", "Research on. Turns off Think.".
  • Disabled items stay focusable and expose the reason via aria-describedby.
  • Focus order: "+" → (menu opens) search → first item; Esc returns focus to "+"; picking returns focus to the composer text area.
  • Contrast: item text 4.5:1 minimum, descriptions 4.5:1, disabled text exempt but the reason line meets 4.5:1.
  • Reduced motion per §5.

Motion & interaction

  • + → × morph. The glyph rotates 45° into a cross as the menu opens (≈200 ms in [R013]); reversed on close. The button keeps its size; only the glyph turns.
  • Open. The menu scales from 0.96 to 1 with origin at the "+" (bottom-left when the menu is above), rises 4 px and fades in. Rows do not stagger by default (a list that appears whole reads faster); expressive motion adds a 20 ms stagger capped at 6 rows.
  • Close. Faster than open, toward the origin, no overshoot. Picking an item closes after the row's press feedback (80 ms), so the click is felt.
  • Highlight. One highlight glides between rows on a snappy spring for both pointer and arrows (as in A command palette and morph select, research notes 12); it snaps instead of gliding on jumps over more than 6 rows.
  • Search. Typing filters live; matched letters render in medium weight (shared matcher with composer-slash-mentions.md). The panel height springs to the result count.
  • Submenu. Opens after 120 ms hover intent; the child slides 8 px from the parent edge and fades. A safe-triangle (pointer heading toward the child) keeps it open for up to 300 ms.
  • Toggle on. Switch thumb springs; a chip for the active mode grows in under the composer (scale 0.85 → 1) at the same moment, so the user sees where the state now lives.
  • Status changes. Connector status label and pill cross-fade (≈100 ms out, 160 ms in, the Arc MCP timing); discovered tools appear one by one with a 4 px fade-in.
  • Error. The row's icon does one 4 px shake; the Retry pill fades in. No toast.
  • Drop on "+". Files dragged onto the closed "+" make it swell to 1.12 and show a paperclip; drop forwards to attachments without opening the menu.
Timing
TransitionDurationDelayEasing / springNotes
Hover fill100 ms0ease-out
Press scale 0.9480 ms0ease-outrelease springs back
+ → × rotate 45°200 ms0spring, critically damped (stiffness 400, damping 40, proposed)≈200 ms observed in [R013]
Menu open (scale 0.96→1, y 4→0, fade)180 ms0ease-out cubic-bezier(0.22, 1, 0.36, 1)proposed
Menu close120 ms80 ms after pick feedbackease-in
Row stagger (expressive only)20 ms per row——cap 6 rows (≤ 120 ms total)
Highlight glide140 ms0spring (stiffness 600, damping 40, proposed)snap on jumps > 6 rows
Panel height on filter160 ms0spring, no overshoot
Submenu open / close160 ms / 100 ms120 ms hover intentease-out / ease-insafe triangle 300 ms
Loading skeletonappears after 150 ms150 ms2 s linear sweepnever flashes for fast lists
Status cross-fade100 ms out + 160 ms in0ease-out
Tool discovered row140 ms each60 ms staggerease-out, 4 px
Active chip grow-in160 ms0springscale 0.85 → 1
Error shake240 ms, 2 cycles, 4 px0linear
Reduced motion0–80 ms opacity cross-fades—linearno rotate (glyph cross-fades + → ×), no scale, no glide, no slide, no shake; skeleton static

Sizes (proposed): menu width 280 px (min 240, max 360), max height 360 px or 60 % of viewport, row 32 px (28 px dense, 44 px touch), section header 24 px, 8 px panel padding, 4 px gap between sections with a 1 px divider.

Responsive behaviour

  • The menu scrolls past 360 px of height.
Edge cases (spec)
  • Long labels and descriptions ellipsize to one line each; full text in tooltip and accessible name. Connector names over 24 characters truncate in the middle ("Google Dr…Sheets") to keep the brand ends.
  • Many items. 40 skills or 30 connectors: search auto-shows (threshold 8 items, the Arc morph-select rule), list virtualises, recent/favourite items pin to the top.
  • No room above. Flip below the trigger; on tiny windows (height < 420 px) use the sheet.
  • RTL. The menu anchors to the "+"'s mirrored side; submenus open to the left; chevrons and back arrows mirror; the + → × rotation stays 45° (symmetrical glyph).
  • Tiny sizes (16–20 px). The "+" becomes a 16 px glyph in minimal and terminal; hit area stays ≥ 24 px (44 px on touch). Submenus collapse into an inline accordion below 280 px width.
  • Touch. No hover intent: tap opens submenus; long-press on a connector shows its details.
  • Slow networks. Async sections show skeleton after 150 ms; a section that fails shows one inline error row with Retry, the rest of the menu still works. OAuth tabs that never return time out after 120 s (proposed) to Error("Sign-in timed out").
  • Busy agent. Attach and Context stay available (they add to the next or queued message). Modes that would change the running turn are disabled with a reason, or queued for the next turn (app choice).
  • Environment limits. Some environments only allow some items (Claude limits WSL sessions to "Add image", research notes 03); items are Hidden or Disabled with a reason, never silently missing.
  • Model limits. If the chosen model cannot use tools, connectors show "Not available with this model" (Zed shows a "No tools" label and warning for MCP-incompatible models, research notes 03/08).
  • Re-auth. A connector that loses auth mid-session flips to NeedsAuth and the "+" gets an amber dot; no modal interrupts typing.
  • Very fast actions. Upload picker returns instantly → menu is already closed; no flash of the item's loading state under 150 ms.

Notes for AI

  • Import ToolsMenu from oxyn_dioxus and include COMPOSER_CSS plus the token stylesheet once.
  • A GPUI version exists: ToolsMenuEl in oxyn_gpui.
  • Props to set first: tools.
  • Keep its states and timings as they ship; restyle it through the CSS variables rather than by hand.

Guides

Oxyn · 74 free components · 264 Pro components · 96 screens · 20 blocks · Dioxus and GPUI