uikit-webcomponents
TypeScript icon, indicating that this package has built-in type declarations

0.1.26 • Public • Published

Web Components

Description

This is a project for building a standalone Web Component using Stencil, to use in any Frontend.

Getting Started

To start building a new web component, clone this repo to a new directory and execute the following commands and run:

npm install
npm build:watch

To run the unit tests for the components, run:

npm test

Using the components

If you want develop with any Frontend you need to link the projects to see the changes locally, check the following link https://flaviocopes.com/npm-local-package/

Here the documentation how we can integrate the Web Component with any Framework https://stenciljs.com/docs/overview

React Example:

import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import registerServiceWorker from './registerServiceWorker';

// test-component is the name of our made up Web Component that we have
// published to npm:
import { applyPolyfills, defineCustomElements } from 'test-components/loader';

ReactDOM.render(<App />, document.getElementById('root'));
registerServiceWorker();

applyPolyfills().then(() => {
  defineCustomElements();
});

Readme

Keywords

none

Package Sidebar

Install

npm i uikit-webcomponents

Weekly Downloads

19

Version

0.1.26

License

MIT

Unpacked Size

610 kB

Total Files

51

Last publish

Collaborators

  • devrockz