lit-plasmic
TypeScript icon, indicating that this package has built-in type declarations

0.4.0 • Public • Published

Plasmic integration as Web component

npm

This web component is a simple way to integrate designs from Plasmic into your website. It is implemented using lit. Therefore, this component does not require any additional scripts or packages, so it can be used even on plain html page.

npm i lit-plasmic

How to use it?

Place component ether in lit template literal or just in html file.

<plasmic-component name="name-of-your-plasmic-component" projectId="your-project-id"
                   publicApiToken="your-public-api-token"></plasmic-component>

Don't forget to import the component!

  1. For usage in literal templates:
import "lit-plasmic";
  1. For usage in html files:
<script src="https://cdn.jsdelivr.net/npm/lit-plasmic/index.min.js" type="module"></script>

API

Here is a table of accepted attributes. Detailed descriptions can be found in Plasmic docs here.

Attribute name Type Default value
name (Required) String -
projectId (Required) String -
publicApiToken (Required) String -
version "published" or "preview" published
hydrate Boolean true
embedHydrate Boolean true
componentProps Object -
globalVariants Array -

Package Sidebar

Install

npm i lit-plasmic

Weekly Downloads

1

Version

0.4.0

License

Unlicense

Unpacked Size

241 kB

Total Files

9

Last publish

Collaborators

  • andrewlevada