Vertex Web Component Library
This project contains common web components for use across Vertex applications.
Getting Started
NPM Dependency
Our components can be installed as an NPM dependency and imported through a
bundler such as Webpack or Rollup. First, add @vertexvis/ui
as an NPM
dependency to your package.json
:
{
"dependencies": {
"@vertexvis/ui": "^0.0.13"
}
}
Next, import defineCustomElements
from the loader that is included as part of
the package. Calling the loader will analyze the components defined in your HTML
and load any components it finds. The returned promise will resolve once the
components are loaded.
import { defineCustomElements } from '@vertexvis/ui/loader';
async function main() {
console.log("Loaded!");
}
defineCustomElements(window).then(() => main());
Local development
For local development, we use story book to see your components and make changes. After following the initial setup in the root of this project, in this module you are able to run the following commands:
yarn build
yarn start
In your browser storybook should open up to http://localhost:6006