Enums
All Inline AI SDK enum objects: named constants for placement types, events, overlay behavior, typography, injection strategies, and FAB positioning.
The SDK exposes a set of frozen enum objects on window.InlineAI that give you named, readable constants instead of raw strings. Using enums makes your integration code self-documenting and reduces the risk of typos. Every enum value has a string equivalent; both forms work everywhere in the SDK API.
// Both are equivalent. Use whichever you prefer:
window.InlineAI.mount('search-fab', undefined, { overlayType: 'modal' });
window.InlineAI.mount(
window.InlineAI.Placement.SearchFab,
undefined,
{ overlayType: window.InlineAI.OverlayType.Modal }
);Placement
window.InlineAI.Placement
The type of placement to mount. Pass these values as the first argument to mount(). See mount() for full usage.
| Key | Value | Description |
|---|---|---|
SearchEmbed | 'search-embed' | Full-width embedded search input bar |
SearchIcon | 'search-icon' | Compact icon/button that opens the search overlay |
SearchFab | 'search-fab' | Floating action button for search (body-level, no target needed) |
BasicEmbed | 'basic-embed' | Embedded AI content block |
KeyTakeaways | 'key-takeaways' | AI-generated key takeaways summary block |
SingleQuestion | 'single-question' | In-content question pills distributed across paragraphs |
Widget | 'widget' | Sticky sidebar panel with floating trigger button (body-level, no target needed) |
Events
window.InlineAI.Events
Event name constants for use with on() and off(). See on() and off() for full usage and payload shapes.
| Key | Value | Description |
|---|---|---|
Ready | 'ready' | SDK initialized and ready to accept mount() calls |
ConfigLoad | 'config:loaded' | Publisher page configuration fully loaded from the API |
PlacementMount | 'placement:mounted' | A placement was mounted |
PlacementUnmount | 'placement:unmounted' | A placement was unmounted |
SearchOpen | 'search:open' | Search overlay opened |
SearchClose | 'search:close' | Search overlay closed |
WidgetOpen | 'widget:open' | Sticky widget panel opened |
WidgetClose | 'widget:close' | Sticky widget panel closed |
OverlayTarget
window.InlineAI.OverlayTarget
Identifies which overlay to target in open() and close() calls. See open() and close().
| Key | Value | Description |
|---|---|---|
Search | 'search' | The search overlay |
Widget | 'widget' | The sticky widget panel |
OverlayType
window.InlineAI.OverlayType
Controls how the search overlay appears when triggered. Pass as overlayType in MountOptions.
| Key | Value | Description |
|---|---|---|
Modal | 'modal' | Centered modal dialog with backdrop |
Drawer | 'drawer' | Slide-in drawer panel |
OpenOverlayOn
window.InlineAI.OpenOverlayOn
Controls when the search overlay opens relative to user interaction. Pass as openOverlayOn in MountOptions.
| Key | Value | Description |
|---|---|---|
QuerySubmit | 'onQuerySubmit' | Opens only after the user submits a query |
Focus | 'onFocus' | Opens as soon as the search input receives focus |
InputShape
window.InlineAI.InputShape
Controls the visual shape of a search input placement. Pass as shape in MountOptions.
| Key | Value | Description |
|---|---|---|
Pill | 'pill' | Fully rounded pill shape |
RoundedRectangle | 'rounded-rectangle' | Rectangle with slightly rounded corners |
TypographySource
window.InlineAI.TypographySource
Controls where the placement inherits its typography (font family, size, weight). Pass as typographySource in MountOptions or InjectConfig.
| Key | Value | Description |
|---|---|---|
Website | 'inherit-from-website' | Inherits font styles from the host page's CSS |
Theme | 'inherit-from-theme' | Uses the typography defined in the Inline AI theme |
InjectionLocation
window.InlineAI.InjectionLocation
Controls where the placement container is inserted relative to its target element. Pass as location in InjectConfig.
| Key | Value | Description |
|---|---|---|
Above | 'above' | Inserted as a sibling immediately before the target element |
Below | 'below' | Inserted as a sibling immediately after the target element |
Prepend | 'prepend' | Inserted as the first child of the target element |
Append | 'append' | Inserted as the last child of the target element |
FabPosition
window.InlineAI.FabPosition
Controls the horizontal position of the search floating action button. Pass as fabPosition.horizontalPosition in MountOptions.
| Key | Value | Description |
|---|---|---|
Left | 'left' | Aligned to the left edge of the viewport |
Right | 'right' | Aligned to the right edge of the viewport |
Center | 'center' | Centered horizontally in the viewport |
InjectionStrategy
window.InlineAI.InjectionStrategy
Controls how SingleQuestion pills are distributed across the content. Pass as injectionStrategy in InjectConfig.
| Key | Value | Description |
|---|---|---|
Default | 'default' | Injects pills sequentially starting from the top |
DistributeEvenly | 'distribute-evenly' | Distributes pills evenly throughout the content |
SuggestedQuestionsMode
window.InlineAI.SuggestedQuestionsMode
Controls how suggested questions appear in a search placement. Pass as suggestedQuestionsMode in MountOptions.
| Key | Value | Description |
|---|---|---|
Animated | 'animated' | Questions animate in one at a time |
Static | 'static' | All questions appear at once without animation |