vt-playground

0.1.8 • Public • Published

Val Town Playground

Embed a val.town playground in your website.

bce075c7644468c59f0a5fc85e03517992948a417dbd2eb8739fe44b7e50ce73

Usage

<!doctype html>
<html>
  <head>
    <title>vt-playground</title>
    <script type="module" src="https://raw.esm.sh/vt-playground@latest/dist/vt-playground.js"></script>
  </head>
  <body>
    <vt-playground id="playground" code="console.log('hello world')"></vt-playground>
  </body>
</html>

See @pomdtr/vt_playground_demo on val.town for a live demo.

API

Attributes

  • code: The code to be executed in the playground. The value of this attribute will be updated when the code changes in the playground.
  • val: A val to load in the playground.

Events

  • code-change: Fired when the code changes. The event detail contains the new code.

Development Commands

npm run dev # Start the development server
npm run build # Build the web component
npm run format # apply prettier to the code

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
0.1.81latest

Version History

VersionDownloads (Last 7 Days)Published
0.1.81
0.1.70
0.1.60
0.1.50
0.1.40
0.1.30
0.1.21
0.1.10
0.1.00
0.0.121
0.0.110
0.0.100
0.0.90
0.0.80
0.0.70
0.0.60
0.0.50
0.0.41
0.0.30
0.0.20
0.0.10

Package Sidebar

Install

npm i vt-playground

Weekly Downloads

4

Version

0.1.8

License

MIT

Unpacked Size

749 kB

Total Files

4

Last publish

Collaborators

  • pomdtr