Name: svelte-custom-elements
Owner: Svelte
Description: Turn Svelte components into web components
Created: 2017-03-02 16:17:06.0
Updated: 2018-05-20 13:44:42.0
Pushed: 2017-09-12 21:04:55.0
Homepage: null
Size: 133
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Register Svelte components as custom elements.
First, you need to be familiar with Svelte. Read the guide if you haven't already, then come back here!
Install svelte-custom-elements to your project…
install -S svelte-custom-elements
…then use it in your app like so:
rt Counter from './Counter.html';
rt { register } from 'svelte-custom-elements';
ster( 'my-component', Counter, [ 'value' ] );
ment.body.innerHTML = '<my-component value="42"></my-component>';
The register
function takes three arguments:
component.thing = 'foo'
) must be included in this list.MIT