Basic Setup
1. Create a Container Element
First, add a container element to your HTML:2. Import and Initialize
Import the SDK and create a playground:Your First Playground
Here’s a complete example with HTML, CSS, and JavaScript:Container Options
You can specify the container in multiple ways:CSS Selector (String)
HTMLElement
Headless Mode (No Container)
In headless mode, you can omit the container:Embed Options
Customize the playground behavior with embed options:Loading Strategies
Lazy Loading (Default)
The playground loads when it enters the viewport:Click-to-Load
Shows a “Click to load” screen:Eager Loading
Loads immediately:Using Templates
Start with a pre-configured template:- React
- Vue
- TypeScript
- Python
Interacting with the Playground
Once created, you can interact with the playground:Watching Events
Listen to playground events:Styling the Container
By default, the container gets some default styles. You can customize them:Complete Example
Here’s a complete HTML page with an embedded playground:Next Steps
API Reference
Explore all available SDK methods and options
Methods
Learn about all playground methods
Events
Understand the event system
Types
Browse TypeScript type definitions