> ## Documentation Index
> Fetch the complete documentation index at: https://docs.rogeriq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Widget Configuration

Configure display, messaging, docs, labels, previous messages, attachments, consent, and runtime options.

# Widget Configuration

Widget configuration can come from the dashboard, the runtime config endpoint, or client-side overrides passed to `init` or `config`.

## Common Options

| Option | Type | Description |
| --- | --- | --- |
| `projectId` | string | Required project ID. |
| `beaconId` | string | Optional linked beacon ID. |
| `theme` | `light`, `dark`, `auto` | Widget theme. |
| `color` | hex | Primary widget color. |
| `docsEnabled` | boolean | Enable docs and AI answer surfaces. |
| `messagingEnabled` | boolean | Enable customer messaging. |
| `mode` | `selfService`, `neutral`, `askFirst` | Default support posture. |
| `enablePreviousMessages` | boolean | Let visitors reopen previous conversations. |
| `enableStreaming` | boolean | Stream AI responses when supported. |
| `consentMode` | `implicit`, `opt-in`, `opt-out` | Analytics consent behavior. |

## Display Options

```js
RogerIQ("init", {
  projectId: "prj_...",
  display: {
    style: "iconAndText",
    text: "Support",
    position: "bottom-right",
    zIndex: 2147483000
  }
});
```

## Messaging Options

```js
RogerIQ("config", {
  messaging: {
    chatEnabled: true,
    contactForm: {
      showName: true,
      showSubject: true,
      allowAttachments: true
    }
  }
});
```

## Label Overrides

Use labels to localize or adjust widget copy.

```js
RogerIQ("config", {
  labels: {
    chatButtonLabel: "Chat with us",
    messageSubmitLabel: "Send message",
    docsSearchEmptyText: "No matching articles"
  }
});
```

Prefer dashboard defaults for stable configuration and `config` overrides for page-specific behavior.