anionic-components v0.13.1
Anionic Components
Anionic components is a library of web components built using Ionic UI components.
The library itself is built using Stencil.
Component List
Stencil
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Using the Components
Installation Option 1 - HTML Tag
Add the anionic-components
script tag to your index.html
:
<script src="https://unpkg.com/anionic-components/dist/anionic.js"></script>
Installation Option 2 - Framework/Stencil
Add anionic-components
to your project:
npm install --save anionic-components
Import anionic-components
in your index.js
or similar file:
import 'anionic-components';
Basic Usage
This is an example from a "field selector modal" component in a Stencil project using Ionic components:
<ion-header>
<ion-toolbar color='primary'>
<ion-title>Select Field/s</ion-title>
</ion-toolbar>
<ion-toolbar>
<anion-chip-inputbar chip-color='secondary' labelText='Selected fields'
onAnionInputChange={(e)=>this.handleAnionInputChange(e)}/>
</ion-toolbar>
</ion-header>
Local Development
If you want to change anything about these components or the library in general, clone this repo to a new directory:
git clone https://github.com/anionic-components/anionic-components.git my-library
cd my-library
git remote rm origin
and run:
npm install
npm start
To build the component for production, run:
npm run build
To run the unit tests for the components, run:
npm test
Need help? Check out the Stencil docs here.