npm-allakando-publish
Version:
Allakando's web component library
63 lines (36 loc) • 1.88 kB
Markdown
## Allakando Web UI Components
### About
Allakando Web UI is a library that enables faster web development through a number of web components, stylesheets, and support functions for the web browser.
The entire library is framework agnostic, and purely built on standard HTML, CSS and JavaScript.
### Getting started
The Allakando Web UI is very easy and simple to start with however the process differs a little bit with where you want to render it, client-side or server-side.
#### `Client Side Rendering`
- Install with [npm](https://www.npmjs.com/): `npm install @allakando/allakando-web-ui`
- `import` or `require` the package `@allakando/allakando-web-ui` to initailize the library.
```javascript
require('@allakando/allakando-web-ui')
//OR
import ("@allakando/allakando-web-ui")
```
To import CSS utilities, use:
```javascript
import "@allakando/allakando-web-ui/dist/css/tooltip.css"
//OR
import { injectStyle } from "@allakando/allakando-web-ui"
injectStyle({
tooltip: true
})
//OR the full bundle
import "@allakando/allakando-web-ui/dist/css/bundle.css"
```
To import utility functions, use:
```javascript
import { alert, openDialog, confirm, showSpinner } from "@allakando/allakando-web-ui"
```
#### `Server Side Rendering`
If you want to use a server side rendering framework you need to ensure that the library is initalized only in the client. When importing utility functions to your project you change all import statements like so:
```javascript
import { alert, openDialog, confirm, showSpinner } from "@allakando/allakando-web-ui/dist/js/utility"
```
### Full Storybook Documentation
The entire library is documented in Storybook: [Storybook](https://unpkg.com/@allakando/allakando-web-ui/dist/storybook/index.html)