mirror of
https://github.com/markmanx/isoflow.git
synced 2025-01-31 23:22:31 +00:00
31 lines
No EOL
1.2 KiB
Text
31 lines
No EOL
1.2 KiB
Text
# Installation
|
|
|
|
**Isoflow** is published to npm as a React component you can directly embed in your projects.
|
|
|
|
Using `npm`:
|
|
|
|
```bash
|
|
npm install isoflow
|
|
```
|
|
|
|
or `yarn`:
|
|
|
|
```bash
|
|
yarn add isoflow
|
|
```
|
|
|
|
### Static assets
|
|
|
|
Isoflow depends on static assets for displaying icons. These iconsets are included as part of the npm package and can be imported into Isoflow directly, but you will get better performance if you host these yourself so each icon is accessible via it's own url (for example, storing them on a service like S3 or CDN). See below for more details on the benefits of lazy-loading vs importing:
|
|
|
|
- **Importing** assets adds to the bundle size, so your users will have to download **all** assets before your app loads. This can be a problem if there are a lot of icons.
|
|
|
|
- **Lazy-loading** assets allow the icons to be downloaded on-demand. Also, lazy-loading assets allows the browser to activate its cache, so they icons only need to be downloaded once.
|
|
|
|
### Dimensions of Isoflow
|
|
|
|
isoflow takes _100%_ of `width` and `height` of the containing block so make sure the container in which you render Isoflow has non zero dimensions.
|
|
|
|
### Demo
|
|
|
|
[Try here](https://codesandbox.io/p/sandbox/github/markmanx/isoflow). |