Skip to main content

Query Parameters

A flexible and convenient way to configure the app is to use URL query parameters. It allows configuration of a wide range of options, including those of the configuration object and embed options.

Example:
https://livecodes.io?js=console.log('Hello World!')&console=open
show code
import { createPlayground } from 'livecodes';

const options = {
"params": {
"js": "console.log('Hello World!')",
"console": "open"
}
};
createPlayground('#container', options);

Usage

Examples

For usage examples, check storybook and unit tests.

Sponsors