Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yuanchuan/svelte-pen
Create Svelte component demo quickly
https://github.com/yuanchuan/svelte-pen
codepen svelte webcomponents
Last synced: 21 days ago
JSON representation
Create Svelte component demo quickly
- Host: GitHub
- URL: https://github.com/yuanchuan/svelte-pen
- Owner: yuanchuan
- License: mit
- Created: 2022-10-27T12:26:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-10-31T09:01:22.000Z (about 2 years ago)
- Last Synced: 2024-09-13T14:14:40.760Z (about 2 months ago)
- Topics: codepen, svelte, webcomponents
- Language: JavaScript
- Homepage: https://codepen.io/yuanchuan/pen/WNybLmE
- Size: 32.2 KB
- Stars: 11
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# svelte-pen
Create Svelte component demo quickly.
```html
{count}
let count = 0;function handleClick() {
count += 1;
}
```
### Import another pen as Svelte component on CodePen.
See example: https://codepen.io/yuanchuan/pen/RwJPoNr
```html
import Percent from '/yuanchuan/pen/WNybLmE.svelte';
```
### Pass component attributes to Svelte.
```html
Hello {name}!
export let name
```
### Use different Svelte version.
The default version is `3.52.0` but you can specify a different version through `svelte:version` attribute.
```html
```