Giter Club home page Giter Club logo

tiagoboeing / anywhere-webcomponents Goto Github PK

View Code? Open in Web Editor NEW
23.0 4.0 1.0 3.82 MB

A UI work in progress based on custom elements (web components) for use in anywhere.

Home Page: https://anywhere.tiagoboeing.com/

License: MIT License

CSS 2.82% TypeScript 8.28% HTML 1.71% JavaScript 79.82% Shell 0.30% Handlebars 0.01% SCSS 7.06%
webcomponents components-library stenciljs js custom-elements stencil web-components javascript components

anywhere-webcomponents's Introduction

Anywhere web components

Built With Stencil All Contributors

Demo here | Roadmap

This project is a work in progress. See projects page to track all status.

The design system and specifications still are open but should be inspired in Nebular, Bootstrap and TailWind.

Give feedback

Write a comment about Design System, give your feedback!

Browser Support

Chrome New Edge (Chromium) Safari Firefox Older Edge IE
60+ 79+ 10.1+ 63+ 16-18 (polyfills) >= 11 (polyfills)

See complete docs

How to install

NPM

Install dependency:

npm i @tiagoboeing/anywhere-webcomponents

And import anywhere-webcomponents.js:

<script src="@tiagoboeing/anywhere-webcomponents/dist/anywhere-webcomponents/anywhere-webcomponents.js"></script>

For use in frameworks, see the Stencil page.

Via CDN (release candidate)

Now you can test components in a HTML page importing via script from CDN.

Stable

<script src="https://cdn.tiagoboeing.com/anywhere-webcomponents/master/anywhere-webcomponents/anywhere-webcomponents.js"></script>
<aw-button label="Primary" mode="square" color="outline" status="success"></aw-button>

Release candidate (develop branch)

(ATTENTION!! Not use for production!)

<script src="https://cdn.tiagoboeing.com/anywhere-webcomponents/develop/anywhere-webcomponents/anywhere-webcomponents.js"></script>
<aw-button label="Primary" mode="square" color="outline" status="success"></aw-button>

Other alternative is use UNPKG, for this, overwrite with the following URL: https://unpkg.com/@tiagoboeing/anywhere-webcomponents@latest/dist/anywhere-webcomponents/anywhere-webcomponents.js

Angular applications

npm i @tiagoboeing/anywhere-webcomponents

In your app.module.ts declare CUSTOM_ELEMENTS_SCHEMA:

import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';

@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    AppRoutingModule
  ],
  providers: [],
  bootstrap: [AppComponent],
  schemas: [CUSTOM_ELEMENTS_SCHEMA]   // <-- declare this
})
export class AppModule { }

And in main.ts end of file, add following imports:

import { applyPolyfills, defineCustomElements } from '@tiagoboeing/anywhere-webcomponents/loader';

defineCustomElements();

// for IE support (optional)
applyPolyfills().then(() => {
  defineCustomElements()
})

React applications

yarn add @tiagoboeing/anywhere-webcomponents

In your src/index.js or src/index.tsx (typescript project) file, add following imports preferably before of the React Render:

import { applyPolyfills, defineCustomElements } from '@tiagoboeing/anywhere-webcomponents/loader';

defineCustomElements();

// for IE support (optional)
applyPolyfills().then(() => {
  defineCustomElements()
})

Components status

See projects page to track all status.

I want to contribute

View contribution guide.

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Tiago Boeing

๐Ÿ’ป ๐Ÿ“† ๐Ÿค” ๐ŸŽจ

lucas souza matos

๐Ÿ“–

This project follows the all-contributors specification. Contributions of any kind welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.