https://github.com/nsstc/slim-fit
Slim, opinionated WebComponent wrapper
https://github.com/nsstc/slim-fit
Last synced: 11 months ago
JSON representation
Slim, opinionated WebComponent wrapper
- Host: GitHub
- URL: https://github.com/nsstc/slim-fit
- Owner: NSSTC
- License: mpl-2.0
- Created: 2020-05-11T18:59:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T11:52:28.000Z (almost 3 years ago)
- Last Synced: 2025-06-25T09:51:18.673Z (12 months ago)
- Language: TypeScript
- Size: 40 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slim-fit
Slim, opinionated WebComponent wrapper
## How to use
```typescript
import {SlimFit} from "slim-fit";
class MyComponent extends SlimFit {
protected render() {
// you may pass an HTMLElement or Node or Fragment for the first parameter, too
this.draw('Hi!', 'strong { color: red; }');
}
}
// register HTML-Tag-Name
MyComponent.registerTag('my-component');
```