@cbeard87/ntara-components
TypeScript icon, indicating that this package has built-in type declarations

0.1.7 • Public • Published

Ntara Component Library

This is a library of Web Components built with Stencil which contains common UI patterns used at Ntara, Inc.

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. (Chrome, Firefox, Edge, Safari, IE11)

Stencil components are just Web Components, so they work in any major framework or with no framework at all.

Getting Started

To contribute to the Ntara Component Library, clone this repo to a new directory:

git clone https://github.com/cbeard87/ntara-components.git
cd ntara-components

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.

Naming Components

When creating new component tags, we use ntara in the component name (ex: <ntara-datepicker>).

All of the Ntara generated web components use the prefix ntara.

Usage

Script tag

  • Publish to Ntara NPM Registry

  • Put script tags similar to this in the head of your index.html:

    <script type="module" src="https://unpkg.com/@cbeard87/ntara-components@0.1.0/dist/ntara-components/ntara-components.esm.js"></script>

    <script nomodule src="https://unpkg.com/@cbeard87/ntara-components@0.1.0/dist/ntara-components/ntara-components.js"></script>

  • Then you can use the elements anywhere in your template, JSX, html, etc.

Node Modules

  • Run npm install @cbeard87/ntara-components --save
  • Put a script tag similar to this <script src='node_modules/@cbeard87/ntara-components/dist/ntara-components.js'></script> in the head of your index.html or master page.
  • Then you can use the element anywhere in your template, JSX, html, etc.

Readme

Keywords

none

Package Sidebar

Install

npm i @cbeard87/ntara-components

Weekly Downloads

14

Version

0.1.7

License

BSD-3-Clause-Attribution

Unpacked Size

853 kB

Total Files

63

Last publish

Collaborators

  • cbeard87