3.0.1 • Published 8 months ago

@zurich/web-sdk v3.0.1

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

Zurich Web SDK

Installation

npm i @zurich/web-sdk --save

Bootstrap

The library relies on Bootstrap 4's grid system. If you are not using Bootstrap in your project already, please make sure to add it as an extra import.

Example usage

Generic HTML import

Import CSS inside <head> section:

<link rel="stylesheet" href="/node_modules/@zurich/web-sdk/css/styles.min.css" />

Import JS at the bottom of the <body> section:

<script src="/node_modules/@zurich/web-sdk/js/scripts.min.js"></script>

JavaScript frameworks

While using this Zurich Web SDK component in frameworks like ReactJS, Vue, and Angular which assume full control of the DOM we recommend not to import @zurich/web-sdk/js/scripts.min.js. Both Zurich Web SDK and the framework may attempt to mutate the same DOM element, resulting in bugs.

Use provided CSS @zurich/web-sdk/css/styles.min.css and HTML examples to create your own implementation of given component in a specific framework.

Please refer to component docs files for HTML code snippets and CSS classes applied.

Angular 11+

Inside your angular.json file, add the following to your projects styles and scripts arrays:

To projects -> <your-app> -> architect -> build -> options -> styles:

Add node_modules/@zurich/web-sdk/css/styles.min.css

Rebuild your app to include the new imports

React

Import CSS at the beginning of your app, e.g. at the top of src/index.js:

import '@zurich/web-sdk/css/styles.min.css';

Alternatively, if using sass, import into your root sass file:

@import '~@zurich/web-sdk/css/styles.min.css';

Vue.JS

Import CSS at the top of your main JS file, e.g. src/main.js:

CSS:

import '@zurich/web-sdk/js/scripts.min.js;

Zcroller API

Zcroller guide

Animations based on animate.css

NOTE: You will need to include animate.css as a dependency. It is not included in the SDK.

PropertyTypeDescriptionValues
data-zcrollerStringAnimation action to apply to given elementSee animate.css options
data-zcroller-delayStringAdd delay to animation"1s", "2s", "3s", "4s", "5s"
data-zcroller-speedStringControl the speed of animation"slow", "slower", "fast", "faster"
data-infiniteBooleanMakes animation infinite
3.0.1

8 months ago

3.0.0

1 year ago

1.8.1

2 years ago

1.8.0

2 years ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

2 years ago

1.7.1

2 years ago

1.5.3

2 years ago

1.7.0

2 years ago

1.6.1

2 years ago

1.6.0

2 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.0

3 years ago

1.2.1

3 years ago

1.1.1

3 years ago

1.1.2

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

0.2.0

3 years ago