Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions assistant/widget.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

export const WidgetCodeBlock = ({ children, ...props }) => (
<CodeBlock {...props}>{children}</CodeBlock>
);

Check warning on line 13 in assistant/widget.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

assistant/widget.mdx#L13

Use semicolons judiciously.

The [assistant](/assistant) answers questions on your Mintlify site. To embed the same capability on another site or web app, use the widget. With the widget, you can give your users access to AI chat trained on your content in your product dashboard, marketing site, support portal, or elsewhere.

Expand All @@ -37,7 +37,7 @@
Replace `YOUR_WIDGET_ID` in the generated code with the widget ID from the [Widget](https://app.mintlify.com/settings/deployment/widget) page of your dashboard.
</Info>

After you add the generated code to your site, reload the page. Confirm the trigger appears, then click it and send a test question to verify the widget is connected.
After you add the generated code to your site, reload the page. Confirm the trigger appears, then click it and send a test question to verify the connection.

<AssistantWidgetPlayground CodeBlockComponent={WidgetCodeBlock}>

Expand Down Expand Up @@ -159,7 +159,7 @@
| `theme` | `light`, `dark`, `system` | Sets the widget color scheme. The default is `system`. |
| `accent` | CSS color | Sets the color of primary controls. |
| `radius` | CSS border radius | Sets the panel radius, such as `18px`. |
| `font` | CSS font family | Uses a font already loaded by your application. The default is bundled Inter. |
| `font` | CSS font family | Uses a font already loaded by your application. The default is Inter, which the widget bundles. |
| `side` | `top`, `bottom`, `left`, `right`, `inline-start`, `inline-end` | Positions the built-in trigger on a screen edge. |
| `align` | `start`, `center`, `end` | Aligns the trigger along its selected edge. |
| `dismissOnInteractOutside` | boolean | Controls whether pointer or focus interactions outside close the assistant. |
Expand All @@ -176,7 +176,7 @@
| `trigger` | string or `null` | Sets the compact widget and panel trigger text. |
| `placeholder` | string or `null` | Sets the composer and modal trigger placeholder. |
| `disclaimer` | string, `false`, or `null` | Sets the empty-state disclaimer. Pass `false` to hide it. |
| `suggestions` | string or `null` | Sets the heading above starter questions. The default is `Suggestions`. |
| `suggestions` | string or `null` | Sets the heading preceding starter questions. The default is `Suggestions`. |

### `AssistantHooks`

Expand Down Expand Up @@ -241,7 +241,7 @@

Conversation snapshots remain private to the widget. Each method resolves to `void`.

## Content Security Policy

Check warning on line 244 in assistant/widget.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

assistant/widget.mdx#L244

'Content Security Policy' should use sentence-style capitalization.

If your site uses a Content Security Policy, allow the origins required by your enabled widget features:

Expand All @@ -251,9 +251,9 @@
| `connect-src` | `https://api.mintlify.com` | Widget API |
| `style-src` | `https://cdn.jsdelivr.net` | Widget style sheet |
| `font-src` | `https://cdn.jsdelivr.net` | Optional bundled Inter font |
| `script-src`, `connect-src`, and `frame-src` | `https://challenges.cloudflare.com` | Turnstile bot protection |

Check warning on line 254 in assistant/widget.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

assistant/widget.mdx#L254

Use 'Cloudflare' instead of 'cloudflare'.
| `script-src` | `https://js.hcaptcha.com` | hCaptcha bot protection |

Check warning on line 255 in assistant/widget.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

assistant/widget.mdx#L255

Use 'hCaptcha' instead of 'hcaptcha'.
| `connect-src` and `frame-src` | `https://*.hcaptcha.com` | hCaptcha bot protection |

Check warning on line 256 in assistant/widget.mdx

View check run for this annotation

Mintlify / Mintlify Validation (mintlify) - vale-spellcheck

assistant/widget.mdx#L256

Use 'hCaptcha' instead of 'hcaptcha'.

A strict `script-src` policy must still authorize both the loader and initialization script. Passing `nonce` to `init()` propagates it only to resources the widget creates after initialization.

Expand Down