LevelChatLevelChatDocs
MicIndicator

Components

MicIndicator

Live / muted indicator. Glass + plain. Hook- or prop-driven.

MicIndicator is the small mic chip that lives on every participant tile and in the control bar. It exposes both a hook-driven mode (subscribes to a participant's live audio state) and a prop-driven mode (forces a state for demos or static surfaces).

Install

pnpm add @levelchat/react-components

Basic usage

Hook-driven inside a provider:

import { MicIndicator } from '@levelchat/react-components';

<MicIndicator participantId="user_42" />

Or prop-driven for previews and static demos:

Headless hook

The styled component delegates to useMicState. Use the hook directly if you want to render your own chip:

import { useMicState } from '@levelchat/react-components';

function MyChip({ participantId }) {
  const { muted } = useMicState({ participantId });
  return <span>{muted ? 'OFF' : 'LIVE'}</span>;
}

Theming

Two surface tiers cover the common contexts: glass for tile corners (semi-transparent backdrop over video) and plain for on-surface use (control bar). Both honour --lc-warning-solid / --lc-danger-solid for the muted state.

Props

PropTypeDefaultNotes
participantIdstringHook-driven mode. Bypassed when muted is provided.
mutedbooleanhookForce the muted state. Wins over the hook.
surface'glass' | 'plain'glassBackdrop tier — glass for over-video, plain for on-surface.
sizenumber24Pixel size of the round chip.
classNamestringPass-through class for extra layout/positioning.
titlestringautoOverride the native tooltip text (defaults to "Muted" / "Live").