---
title: Display modes
description: Select a floating chat widget, side panel, or modal.
icon: Settings
---

All chat components use the same API key pair, customer identity, and conversations.
Use the [contact form](/contact-form) to collect a message before chat starts.

## Floating widget

Use `CoristenWidget` to show a chat button in a corner of the website.

```tsx
import { CoristenWidget } from "@coristen/widget"

;<CoristenWidget apiKey="coristen_pk_..." />
```

## Side panel

Use `CoristenDock` to open chat beside your page content.
On desktop, the dock moves the page content. On mobile, the dock fills the screen.

```tsx
import { CoristenDock } from "@coristen/widget"

;<CoristenDock
  apiKey="coristen_pk_..."
  side="right"
  trigger={<button type="button">Open chat</button>}
>
  <App />
</CoristenDock>
```

Set `side` to `"left"` or `"right"`. Put your page content inside the component.

## Modal

Use `CoristenModal` to open chat over the page. On mobile, the modal fills the screen.

```tsx
import { CoristenModal } from "@coristen/widget"

;<CoristenModal
  apiKey="coristen_pk_..."
  trigger={<button type="button">Open chat</button>}
/>
```

Use a native button for `trigger`. Select the area outside the modal to close chat on desktop.

Import `@coristen/widget/styles.css` once for all display modes.
Use the same public key or identity route in each component.
