Socket
Book a DemoInstallSign in
Socket

@salesforcedevs/sfdocs-remark-lwc-playground-plugin

Package Overview
Dependencies
Maintainers
16
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforcedevs/sfdocs-remark-lwc-playground-plugin

SFDocs remark plugin for lwc component playground

latest
npmnpm
Version
1.0.2
Version published
Maintainers
16
Created
Source

LWC Component Playground Plugin

This plugin transforms component playground markdown syntax to doc-component-playground HTML elements. It allows embedding interactive component example previews into documentation, enabling users to explore component behavior dynamically.

Setup

To use this plugin, set the PLAYGROUND_APP_URL environment variable to the base URL of your playground application.

Example:

export PLAYGROUND_APP_URL='https://example-lwc-playground.com'

Install & Build

yarn install && yarn build

Usage

LWC Model with Lightning Namespace

::component-playground{component="button" model="lwc" namespace="lightning"}

Aura Model with Lightning Namespace

::component-playground{component="accordionSection" model="aura" namespace="lightning"}

Transformed HTML for LWC Namespace

<doc-component-playground component="button" model="lwc" namespace="lightning" playground-app-url=${playgroundAppUrl}>
</doc-component-playground>

Publish

To test the plugin code, publish an alpha package using the following command:

yarn publish --new-version 1.0.0-alpha --tag alpha

To publish the actual package:

yarn publish

Keywords

remark-sfdocs-lwc-playground-plugin

FAQs

Package last updated on 12 Jun 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts