Skip to content

feat: add mute/unmute toggle for pencil stroke sounds#25

Open
sachinsmc wants to merge 2 commits intoexcalidraw:mainfrom
sachinsmc:allow-mute
Open

feat: add mute/unmute toggle for pencil stroke sounds#25
sachinsmc wants to merge 2 commits intoexcalidraw:mainfrom
sachinsmc:allow-mute

Conversation

@sachinsmc
Copy link
Copy Markdown
Contributor

@sachinsmc sachinsmc commented Feb 13, 2026

Summary

  • Adds a sound toggle button to the toolbar so users can mute/unmute pencil stroke audio during streaming
  • Persists preference via localStorage (default: muted)
  • In fullscreen mode, the mute button adopts Excalidraw's native island styling (uses --island-bg-color, --default-border-color, --shadow-island CSS variables) for visual consistency with the Export button
  • Toolbar is always visible in fullscreen (no hover needed) and repositioned to avoid overlapping Excalidraw's top-right UI

Changes

  • src/pencil-audio.ts — Added isMuted(), toggleMute() exports with localStorage persistence (excalidraw:muted key). Default state is muted. playStroke() now checks mute flag before playing.
  • src/mcp-app.tsx — Added SoundOnIcon/SoundOffIcon SVG components and mute button to toolbar. Toolbar always renders (mute button in both modes, fullscreen button only in inline mode).
  • src/global.css — Shared button styles for .fullscreen-btn and .mute-btn. Fullscreen-specific overrides: always-visible toolbar, native Excalidraw island styling for the mute button.

Adds a sound toggle button to the toolbar that persists preference
via localStorage (default: muted). In fullscreen, the button adopts
Excalidraw's native island styling for visual consistency.
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 13, 2026

@sachinsmc is attempting to deploy a commit to the Excalidraw Team on Vercel.

A member of the Team first needs to authorize it.

@sidPhoenix17
Copy link
Copy Markdown

Hi! Someone please review/approve this

# Conflicts:
#	src/global.css
#	src/mcp-app.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants