https://github.com/juicy/juicy-composer
Custom Element that build Shadow DOM tree according to given JSON
https://github.com/juicy/juicy-composer
frozen plain-js
Last synced: 3 months ago
JSON representation
Custom Element that build Shadow DOM tree according to given JSON
- Host: GitHub
- URL: https://github.com/juicy/juicy-composer
- Owner: Juicy
- License: mit
- Created: 2016-03-26T19:07:27.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2017-01-18T13:40:27.000Z (over 9 years ago)
- Last Synced: 2025-02-24T09:44:05.343Z (over 1 year ago)
- Topics: frozen, plain-js
- Language: HTML
- Size: 35.2 KB
- Stars: 0
- Watchers: 11
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# <juicy-composer>
> Custom Element that build Shadow DOM tree according to given JSON
## Demo
[Check it live!](http://Juicy.github.io/juicy-composer)
## Install
Install the component using [Bower](http://bower.io/):
```sh
$ bower install juicy-composer --save
```
Or [download as ZIP](https://github.com/Juicy/juicy-composer/archive/master.zip).
## Usage
1. Import polyfill:
```html
```
2. Import custom element:
```html
```
3. Start using it!
```html
```
it will build you
```html
```
## Options
Attribute | Options | Default | Description
--- | --- | --- | ---
`setup` | *JSON* | `{}` | Setup to reflect shadow DOM structure. It's also a property.
`auto-stamp` | *Boolean* | `false` | Set to make it stamp Shadow DOM on created and every setup change. It's also a `autoStamp` property.
## Methods
Method | Parameters | Returns | Description
--- | --- | --- | ---
`stamp` | | | Call it to imperatively stamp shadow DOM tree. If `auto-stamp` attribute is set, it's done automatically, when element is created, or setup is changed.
## Events
Event | Description
--- | ---
## Development
In order to run it locally you'll need to fetch some dependencies and a basic server setup.
1. Install [bower](http://bower.io/) & [polyserve](https://npmjs.com/polyserve):
```sh
$ npm install -g bower polyserve
```
2. Install local dependencies:
```sh
$ bower install
```
3. Start development server and open `http://localhost:8080/components/juicy-composer/`.
```sh
$ polyserve
```
## History
For detailed changelog, check [Releases](https://github.com/Juicy/juicy-composer/releases).
## License
MIT