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().

The single question placement requires a target. The SDK injects pills as siblings to paragraph elements inside the target container. For best results, target the element that directly wraps your article body text.

Targeting the container

window.InlineAI.mount(window.InlineAI.Placement.SingleQuestion, {
  dynamic: { tagName: 'article' },
  injectionLimit: 3,
  injectionStrategy: window.InlineAI.InjectionStrategy.DistributeEvenly,
});

Injection options

injectionLimitQuerynumber

Maximum number of question pills to inject into the content. The SDK will not exceed this number regardless of how many paragraphs the article contains.

injectionStrategyQueryInjectionStrategy

How 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.
injectionSelectorOffsetQuerynumber

Offset for the first injection point. A value of 1 skips the first paragraph and starts injecting from the second.

typographySourceQueryTypographySource

Typography inheritance mode for the question pills: "inherit-from-website" or "inherit-from-theme".

Sizing and positioning

locationQueryInjectionLocation

Where to inject each pill relative to its target paragraph: "above", "below", "prepend", or "append".

widthQuerystring

Width of each pill container as a CSS value.

maxWidthQuerystring

Maximum 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,
});

InjectionStrategy.DistributeEvenly tends to produce the best engagement on long articles because it surfaces questions throughout the content rather than clustering them at the top.

For unmounting, SPA routing, and command-queue usage, see the programmatic control guide.

© 2026 Inline AI