Skip to main content
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.
Parameters: 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
Example:

Inline lifecycle callbacks

Added in Web SDK 2.5.0. All three callbacks are optional — existing integrations keep working unchanged.
Inline rendering involves a backend round trip, so the container stays empty for a moment. These callbacks let you show your own loading state instead of an empty gap, and reserve space so the rest of your form does not jump when the agreement appears. They fire in order: onLoading before the request, then either onReady or onError.

Callback payloads

onReady fires for every successful outcome, not just a freshly rendered checkbox:
A callback that throws will not fail the render — the SDK catches it and logs to console.error. onError is a notification, not a replacement for handling the rejected promise from renderInline().

finalizeAll

Finalizes multiple inline clickwraps at once. Useful when your page has several agreements that should all be submitted together.
Parameters: Returns: Promise<Record<string, ClicktermInlineFinalizeResult>> The result is an object keyed by container ID:
Throws: ClickwrapError if:
  • No inline clickwraps are available to finalize
  • Any of the specified container IDs do not have a rendered clickwrap
Example:

ClicktermInlineHandle

The handle returned by renderInline(). 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 the style 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 typed Dimension accepts either a number (treated as pixels) or a CSS string such as '0.5rem'.

CSS custom properties

Each inline instance gets a unique theme, so multiple instances on the same page can have different styles. Every style 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):
Custom color and size:
Circular checkbox:
Custom font:
Frameless, blended into your own form: By default the inline clickwrap draws a white background and a border. Clear them to let it sit directly on your page.
Full brand match, including states and links:
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 concurrent renderInline() 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.