@district09/lod-widgets
v1.3.1
Published
Stencil Component Starter
Downloads
67
Readme
What is this repo?
This is the District09 LOD component library.
NPM Link: https://www.npmjs.com/package/@district09/lod-widgets
Why does this use Stencil and what is it?
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 runtime 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.
Getting Started
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 docs here.
Available components
- LodTable
- HTML:
- Documentation
- LodCards
- HTML:
- Documentation
- LodCard
- HTML:
- Documentation
- LodDecisionsList
- HTML:
- Documentation
- LodRegulationsList
- HTML:
- Documentation
- LodDecisionCard
- HTML:
- Documentation
- LodOpeningHours
- HTML:
- Documentation
Using the components
You can install the components with npm and just use import
npm i @district09/lod-widgets
Or you can also import the components via a script tag:
<script
type="module"
src="https://unpkg.com/@district09/lod-widgets/dist/lod-widgets/lod-widgets.esm.js"
></script>
<lod-cards></lod-cards>
<lod-table></lod-table>
This will only load the necessary javascript for the components that are used on your page. This means if you don't have lod-table, it won't load the js files for lod-table and it will make your application faster :)
You can also import the script as part of your node_modules
in your applications entry file:
import "lod-widgets/dist/lod-widgets/lod-widgets.esm.js";