packages/lit-dev-content/site/docs/v2/internal/demos.md
This is an internal only page to demonstrate various ways to embed code into Markdown docs.
Just highlight some code, non-interactive. Uses the same renderer as playground, so highlight styles will match.
```js
html`<h1>Hello ${name}</h1>`
```
html`<h1>Hello ${name}</h1>`
One editable file from a project, with a preview right below.
Arguments:
samples/PATH/project.json.Additional project.json config options:
previewHeight: Height of the preview in pixels (default 120px).{% raw %}{% playground-example "v2-docs/templates/define" "my-element.ts" %}{% endraw %}
{% playground-example "v2-docs/templates/define" "my-element.ts" %}
Fully editable playground project, with preview to the side.
Arguments:
samples/PATH/project.json.{% raw %}{% playground-ide "v2-docs/templates/define" %}{% endraw %}
{% playground-ide "v2-docs/templates/define" %}
Use extends in your project.config to inherit from the site base
configuration that resolve imports to lit-next:
{
"extends": "/samples/v2-base.json",
}