custom-element-types
v0.2.7
Published
A generator to create Framework integrations and types for Custom Elements using the Custom Elements Schema format.
Downloads
93
Maintainers
Readme
custom-element-types
A generator to create type definitions and framework bindings for applications using Web Components (Custom Elements).
Getting Started
Install via NPM
npm install --save-dev custom-element-types
Playground
If you have a published Web Component library you can try out the generator playground.
CLI
custom-element-types --write --type react --entrypoint @blueprintui/components
| Args | Description |
| ----------------- | ---------------------------------------------------------------------------- |
| type | react
, preact
, angular
, typescript
, blazor
|
| custom-elements | optional custom path to custom-elements.json
file |
| write | write to file, optionally provide a output directory path |
| entrypoint | package name for base entrypoint import path, else defaults to relative path |
Examples
- React: https://stackblitz.com/edit/http-server-noh4jj
- Angular: https://stackblitz.com/edit/node-1tthxz
- Preact: https://stackblitz.com/edit/vitejs-vite-8qed1q
- Blazor: https://github.com/coryrylan/clarity-blazor