{"id":17698467,"url":"https://github.com/vscode-elements/webview-playground","last_synced_at":"2026-03-14T12:31:44.221Z","repository":{"id":259111878,"uuid":"863174746","full_name":"vscode-elements/webview-playground","owner":"vscode-elements","description":"Handy web components for emulating the VSCode Webview environment.","archived":false,"fork":false,"pushed_at":"2025-02-18T19:34:26.000Z","size":357,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T17:21:15.267Z","etag":null,"topics":["visual-studio-code","vscode","vscode-webview","webcomponents"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vscode-elements.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-25T21:01:20.000Z","updated_at":"2025-03-10T15:30:44.000Z","dependencies_parsed_at":"2024-11-07T23:25:28.219Z","dependency_job_id":"8da2f2e6-0698-4ffd-a326-b99f731441db","html_url":"https://github.com/vscode-elements/webview-playground","commit_stats":null,"previous_names":["vscode-elements/webview-playground"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-elements%2Fwebview-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-elements%2Fwebview-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-elements%2Fwebview-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vscode-elements%2Fwebview-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vscode-elements","download_url":"https://codeload.github.com/vscode-elements/webview-playground/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248814038,"owners_count":21165667,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["visual-studio-code","vscode","vscode-webview","webcomponents"],"created_at":"2024-10-24T15:08:46.552Z","updated_at":"2026-03-14T12:31:39.198Z","avatar_url":"https://github.com/vscode-elements.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VSCode Webview Playground\n\nHandy web components for emulating the VSCode Webview environment.\n\n## Installation\n\nInstall as npm package:\n\n```\nnpm install -D @vscode-elements/webview-playground\n```\n\nAlternatively, you can just copy the files from the `/dist` directory into your project. \nThey are pure JavaScript files, so no bundler is required. It’s up to you how to exclude them from the production build.\n\n## Available components\n\n### \u0026lt;vscode-dev-toolbar\u0026gt;\n\nInsert theme variables and default styles into the page. It appears as a button in the lower right corner. When clicked, a simple toolbar is displayed.\n\n![Dev toolbar button](https://github.com/vscode-elements/webview-playground/raw/main/image.png)\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003ctitle\u003eWebview Playground\u003c/title\u003e\n  \u003cscript type=\"module\" src=\"node_modules/@vscode-elements/webview-playground/dist/index.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cvscode-dev-toolbar\u003e\u003c/vscode-dev-toolbar\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\nThe button can be hidden by the `hidden` attribute or `hidden` property:\n\n```javascript\ndocument.querySelector('vscode-dev-toolbar').hidden = true;\n```\n\n### \u0026lt;vscode-demo\u0026gt;\n\nAn isolated block intended for use in a documentation site, e.g., Storybook. It inserts the theme variables but doesn't modify the host page's styles.\n\n![alt text](https://github.com/vscode-elements/webview-playground/raw/main/image-1.png)\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml\u003e\n\u003chead\u003e\n  \u003cmeta charset=\"UTF-8\"\u003e\n  \u003ctitle\u003eWebview Playground\u003c/title\u003e\n  \u003cscript type=\"module\" src=\"node_modules/@vscode-elements/webview-playground/dist/index.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n  \u003cvscode-demo\u003e\n    \u003cspan class=\"badge activity-bar-counter\"\u003e42\u003c/span\u003e\n  \u003c/vscode-demo\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n### Internal components\n\nFurther \"private\" components:\n\n- \u0026lt;vscode-theme-selector\u0026gt;\n- \u0026lt;vscode-toggle-motion\u0026gt;\n- \u0026lt;vscode-toggle-underline\u0026gt;\n- \u0026lt;vscode-view-container-selector\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvscode-elements%2Fwebview-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvscode-elements%2Fwebview-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvscode-elements%2Fwebview-playground/lists"}