jatui

Sound

Web Audio helper — CC0 UI sound clips with opt-in toggle (default off)

Sound Enable Toggle

Sound is off by default. State persists to localStorage. AudioContext is created lazily on first user gesture.

Clip Library

Click any button to preview. First click initialises the AudioContext and registers clips. All clips are CC0 (Kenney Interface Sounds).

Success

Task complete, save confirmed

Error

Action failed, validation error

Notify

New message or notification

Toggle

Toggle or checkbox state change

Send

Message sent, form submitted

Pop

Subtle click or button tap

API

ExportSignatureDescription
registerSound(name, dataUri) → Promise<void>Decode and cache a clip. Call after first user gesture.
play(name, options?) → voidPlay a registered clip. No-op if sound is disabled or unavailable.
setSoundEnabled(enabled: boolean) → voidPersist preference to localStorage.
isSoundEnabled() → booleanRead current preference (default: false).