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

https://github.com/metonym/template-svelte-component

Template for building Svelte components
https://github.com/metonym/template-svelte-component

component library rollup svelte typescript

Last synced: 3 months ago
JSON representation

Template for building Svelte components

Awesome Lists containing this project

README

          

# template-svelte-component

> Template for building Svelte components.

This is a minimal template for building and documenting Svelte components.

- **Rollup** is used to build the component for ES/UMD formats.
- **Sapper** is used for component development and documentation (demo deployed using GitHub Pages). See the [demo](demo) folder.

## Install

```bash
yarn add -D template-svelte-component
```

## Usage

```html

import Component from "template-svelte-component";

```

## API

| Property name | Value |
| :------------ | :--------------------------------------- |
| class | `string` (default: 'default-class-name') |

## Forwarded events

- on:click
- on:mouseover
- on:mouseenter
- on:mouseout
- on:focus
- on:blur
- on:keydown

## [Changelog](CHANGELOG.md)

## License

[MIT](LICENSE)

[npm]: https://img.shields.io/npm/v/template-svelte-component.svg?color=blue
[npm-url]: https://npmjs.com/package/template-svelte-component
[build]: https://travis-ci.com/metonym/template-svelte-component.svg?branch=master
[build-badge]: https://travis-ci.com/metonym/template-svelte-component