LiveKit docs › Components › PreJoin

---

# PreJoin

The `PreJoin` prefab component is normally presented to the user before he enters a room. This component allows the user to check and select the preferred media device (camera and microphone). On submit the user decisions are returned, which can then be passed on to the `LiveKitRoom` so that the user enters the room with the correct media devices.

## Import

```typescript
import { PreJoin } from "@livekit/components-react";

```

## Remarks

This component is independent of the `LiveKitRoom` component and should not be nested within it. Because it only accesses the local media tracks this component is self-contained and works without connection to the LiveKit server.

## Usage

```tsx
<PreJoin />

```

## Properties

- **`camLabel`** _(string)_ (optional): _(Optional)_

- **`debug`** _(boolean)_ (optional): _(Optional)_ Display a debug window for your convenience.

- **`defaults`** _(Partial<LocalUserChoices>)_ (optional): _(Optional)_ Prefill the input form with initial values.

- **`joinLabel`** _(string)_ (optional): _(Optional)_

- **`micLabel`** _(string)_ (optional): _(Optional)_

- **`onError`** _((error: Error) => void)_ (optional): _(Optional)_

- **`onSubmit`** _((values: LocalUserChoices) => void)_ (optional): _(Optional)_ This function is called with the `LocalUserChoices` if validation is passed.

- **`onValidate`** _((values: LocalUserChoices) => boolean)_ (optional): _(Optional)_ Provide your custom validation function. Only if validation is successful the user choices are passed to the onSubmit callback.

- **`persistUserChoices`** _(boolean)_ (optional): _(Optional)_ If true, user choices are persisted across sessions.

- **`userLabel`** _(string)_ (optional): _(Optional)_

- **`videoProcessor`** _(TrackProcessor<Track.Kind.Video>)_ (optional): _(Optional)_

---

This document was rendered at 2026-06-07T11:32:00.352Z.
For the latest version of this document, see [https://docs.livekit.io/reference/components/react/component/prejoin.md](https://docs.livekit.io/reference/components/react/component/prejoin.md).

To explore all LiveKit documentation, see [llms.txt](https://docs.livekit.io/llms.txt).