0.4.0 • Published 1 year ago

lit-plasmic v0.4.0

Weekly downloads
-
License
Unlicense
Repository
github
Last release
1 year ago

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 nameTypeDefault value
name (Required)String-
projectId (Required)String-
publicApiToken (Required)String-
version"published" or "preview"published
hydrateBooleantrue
embedHydrateBooleantrue
componentPropsObject-
globalVariantsArray-
0.4.0

1 year ago

0.3.1

1 year ago

0.3.0

2 years ago

0.2.3

2 years ago

0.2.2

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.1.0

2 years ago