SettingsModal is the in-call preferences surface — three default tabs (Audio, Video, Display) with device pickers, the noise-suppression toggle, and a placeholder for display preferences. Controlled (open + onOpenChange) so the host app owns visibility.
Install
pnpm add @levelchat/react-components @levelchat/webBasic usage
import { SettingsModal } from '@levelchat/react-components';
const [open, setOpen] = useState(false);
<SettingsModal open={open} onOpenChange={setOpen} />Custom tabs
Pass a tabs array to replace or extend the defaults:
<SettingsModal
open={open}
onOpenChange={setOpen}
tabs={[
{ id: 'audio', label: 'Audio', render: (s) => <AudioPrefs state={s} /> },
{ id: 'captions', label: 'Captions', render: () => <CaptionsPrefs /> },
{ id: 'shortcuts', label: 'Shortcuts', render: () => <KeyboardPrefs /> },
]}
/>Accessibility
role="dialog"+aria-modal="true".- First tab focused on open; focus restored to the trigger on close.
- ESC closes; backdrop click closes; content click never propagates.
role="tablist"+role="tab"+role="tabpanel"for the section nav.
Props
| Prop | Type | Default | Notes |
|---|---|---|---|
open | boolean | required | Modal visibility. |
onOpenChange | (next: boolean) => void | required | Visibility setter. |
tabs | SettingsTab[] | Audio / Video / Display | Replace or extend the default tabs. |
title | string | "Settings" | Header label. |