Mods: let a Button show an icon (an Svg) instead of a text label

Status Open
Reported on v2.1.295
Maintainer reply None cached
Activity 0 comments · opened Oct 9, 2026

What I'm building
session-usage-band, a mod that draws a usage band above the prompt. On the desktop's Code tab it draws its icons and meters with Svg. The band has a disclosure toggle that opens and closes an expanded view.

The problem
Button is the only element that takes a press, and it accepts nothing but a text label. Box and Svg have no onPress. So a mod that draws every other icon as an SVG has to draw its buttons as text glyphs (▿ / ▵). Those don't match the rest of the band, and glyph metrics vary by font: ⌄ sits about 5px low, and ⌃ reads as the Ctrl key.

!The band on the desktop: every icon is an Svg except the expand toggle, a text glyph, circled in red

What would help (any one of these)

  1. An icon prop on Button taking SVG markup, with the label kept as the accessible name. Surfaces without Svg would draw the label.
  2. Allow one Svg child in a Button on surfaces that draw Svg, with the label as the fallback.
  3. onPress on Box, with the same focus, hotkey and Enter handling a Button gets.

Option 1 keeps the terminal, keyboard focus and screen readers working as they do now.

Environment
Claude Code 2.1.295 (CLI) and the desktop app's bundled 2.1.289, macOS.

View original on GitHub ↗