Requires SDK v2.2.0 or later. See Installation.
ClicktermDom renders inline clickwrap checkboxes directly inside your page. Unlike ClicktermDialog (which shows a modal overlay), inline mode embeds a checkbox + agreement text in a container you provide, giving you full control over the submission flow.
Access
Methods
renderInline
Renders an inline clickwrap checkbox inside the specified container element.
ClickwrapTemplateRequest:
ClicktermInlineOptions:
Returns:
Promise<ClicktermInlineHandle>
Throws: ClickwrapError if:
- The container element is not found in the DOM
- An inline clickwrap is already rendered in that container
- The backend response is missing inline content
- A network or server error occurs
Inline lifecycle callbacks
Added in Web SDK
2.5.0. All three callbacks are optional — existing integrations keep working unchanged.onLoading before the request, then either onReady or onError.
Callback payloads
onReady fires for every successful outcome, not just a freshly rendered checkbox:
finalizeAll
Finalizes multiple inline clickwraps at once. Useful when your page has several agreements that should all be submitted together.
Returns:
Promise<Record<string, ClicktermInlineFinalizeResult>>
The result is an object keyed by container ID:
ClickwrapError if:
- No inline clickwraps are available to finalize
- Any of the specified container IDs do not have a rendered clickwrap
ClicktermInlineHandle
The handle returned byrenderInline(). Use it to check state and finalize the agreement.
ClicktermInlineFinalizeResult
If
finalize() fails (network error, server error), the checkbox is
automatically unlocked so the user can retry.Styling reference
The inline clickwrap renders inside a closed Shadow DOM, isolating it from your page styles. Customize its appearance using thestyle option.
Web SDK
2.5.0 expanded this option considerably. The container, links, formatting
marks, and every checkbox state are now covered, so matching your own design should
no longer require injecting CSS into the Shadow DOM. Everything below is additive —
existing style objects keep working.ClicktermInlineStyleOptions
Any field typedDimension accepts either a number (treated as pixels) or a CSS string such as '0.5rem'.
- checkbox
- text
- container
- locked
CSS custom properties
Each inline instance gets a unique theme, so multiple instances on the same page can have different styles. Everystyle field is applied as a --ct-w-inline-* custom property on that instance’s theme scope.
This table lists the most commonly overridden properties. The full theme defines
roughly 77 variables following the same
--ct-w-inline-<area>-<property> naming.
Prefer the style option over targeting these variables directly — the option is the
supported surface and survives internal changes.Examples
Default look (no customization):Dashboard-based widget customization applies
to dialog mode only. Inline mode appearance is controlled through the
style option shown above.How it works
The inline clickwrap is rendered inside a closed Shadow DOM attached to your container element. This provides full CSS isolation — your page styles cannot affect the widget, and widget styles cannot leak into your page. The SDK maintains an internal registry of all rendered inline clickwraps. This registry prevents rendering twice into the same container, handles race conditions from concurrentrenderInline() calls, and automatically cleans up entries when containers are removed from the DOM.
When the agreement text contains links, clicking them opens a read-only modal showing the full content. The user’s checkbox state is not affected.
All agreement HTML from the backend is sanitized before injection. Dangerous tags (script, iframe, event handlers) are stripped, and only safe URL protocols (http:, https:, mailto:) are allowed.
