Single question
Distribute AI-generated in-content question pills across your article's paragraphs to drive engagement and surface related queries inline.
The single question placement injects AI-generated question pills directly into your article content, distributing them across paragraphs as users scroll. Each pill presents a question related to the surrounding content; clicking it opens the search overlay with that question pre-filled. This placement is designed for long-form articles and blog posts where you want to prompt reader engagement at natural breakpoints in the text.
Mounting the placement
Pass Placement.SingleQuestion and a target to mount(). The target is typically a dynamic matcher pointing at your article container, since the SDK needs to traverse its child paragraphs to distribute pills.
window.InlineAI.mount(
window.InlineAI.Placement.SingleQuestion,
{
dynamic: { tagName: 'article' },
injectionLimit: 3,
injectionStrategy: window.InlineAI.InjectionStrategy.DistributeEvenly,
}
);The call returns a placement ID you can pass to unmount().
Targeting the container
window.InlineAI.mount(window.InlineAI.Placement.SingleQuestion, {
dynamic: { tagName: 'article' },
injectionLimit: 3,
injectionStrategy: window.InlineAI.InjectionStrategy.DistributeEvenly,
});Injection options
injectionLimitQuerynumberMaximum number of question pills to inject into the content. The SDK will not exceed this number regardless of how many paragraphs the article contains.
injectionStrategyQueryInjectionStrategyHow to distribute pills across the content:
window.InlineAI.InjectionStrategy.Default("default"): places pills at the beginning of the content.window.InlineAI.InjectionStrategy.DistributeEvenly("distribute-evenly"): spaces pills evenly across the available paragraphs.
injectionSelectorOffsetQuerynumberOffset for the first injection point. A value of 1 skips the first paragraph and starts injecting from the second.
typographySourceQueryTypographySourceTypography inheritance mode for the question pills: "inherit-from-website" or "inherit-from-theme".
Sizing and positioning
locationQueryInjectionLocationWhere to inject each pill relative to its target paragraph: "above", "below", "prepend", or "append".
widthQuerystringWidth of each pill container as a CSS value.
maxWidthQuerystringMaximum width of each pill container.
breakpointsQueryBreakpointConfig[]Responsive breakpoints for controlling when and at what size pills render.
Examples
window.InlineAI.mount(window.InlineAI.Placement.SingleQuestion, {
dynamic: { tagName: 'article' },
injectionLimit: 3,
injectionStrategy: window.InlineAI.InjectionStrategy.DistributeEvenly,
});For unmounting, SPA routing, and command-queue usage, see the programmatic control guide.