Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/hunchcloud/live-element

A custom element to live edit other custom elements
https://github.com/hunchcloud/live-element

custom-element live-editing playground web-components

Last synced: about 1 month ago
JSON representation

A custom element to live edit other custom elements

Awesome Lists containing this project

README

        

# ``

[![npm](https://img.shields.io/npm/v/@hunchcloud/live-element.svg)](https://www.npmjs.com/package/@hunchcloud/live-element)

A custom element to live edit other custom elements. Like react-live, but for web components (custom elements).

💫️ [Demos](https://live-element.glitch.me/)

![demo.gif](demo.gif)

## Usage

Install by

```
yarn add @hunchcloud/live-element
```

Insert the following HTML

```html



```

Then you will get a playground to live edit ``.

Notice the `` wrapper is required to prevent `` rendering before being passed to ``.

## Customize editor styles

Use `style-template-id` to pass in customized styles.

```html



#live-editor {
color: #657b83;
background: #073642;
}
::slotted(*) {
background: lightcyan;
}



```

## Development

```
yarn start
```