Skip to main content

Embedding Tools

CTP tools can be embedded in any web page using the SDK.

Quick Start

SDK Installation

CDN

npm

Embedding Methods

Declarative (Data Attributes)

Programmatic

Configuration Options

Autosense

Autosense automatically detects and matches the host page’s styling framework.

Supported Frameworks

How It Works

The SDK:
  1. Scans the page for framework indicators
  2. Detects CSS variables and class patterns
  3. Applies matching styling tokens
  4. Falls back to neutral theme if undetected

Manual Override

Theme Configuration

Using CSS Variables

Dark Mode

Event Handling

Iframe Embedding

For complete isolation:

PostMessage Communication

Responsive Behavior

The SDK automatically adjusts for different viewport sizes: