An open API service indexing awesome lists of open source software.

https://github.com/teammaestro/stencil-shimmer

StencilJS component for adding shimmer UI effect to your applications.
https://github.com/teammaestro/stencil-shimmer

angular ionic shimmer stenciljs stenciljs-components web-components

Last synced: 10 months ago
JSON representation

StencilJS component for adding shimmer UI effect to your applications.

Awesome Lists containing this project

README

          

# Hive StencilJS Shimmer
Web component that allows you to render shimmer UI in your web (and Ionic native) applications.

## Installation
- `npm install @teamhive/stencil-shimmer`

## Usage
- ``

### Angular (6+) / Ionic (4+)
In your `angular.json` file add the following assets matcher in your `projects.app.architect.build.options.assets` collection:
```
{
"glob": "**/*",
"input": "node_modules/@teamhive/stencil-shimmer/dist/shimmer",
"output": "./shimmer"
}
```

In your main `AppModule` (i.e. `app.module.ts`) add the following import statement:

```
import '@teamhive/stencil-shimmer/dist/shimmer';
```

### CSS Variables
|Variable|Default|
:---:|:---:
|`--box-height`|`104px`|
|`--box-width`|`100px`|
|`--line-height`|`10px`|
|`--line-width`|`100%`|
|`--line-margin-start`|`10px`|
|`--shimmer-start`|`-468px`|
|`--shimmer-end`|`-468px`|
|`--shimmer-duration`|`1s`|
|`--shimmer-timing-function`|`linear`|
|`--shimmer-iteration-count`|`infinite`|
|`--shimmer-direction`|`forwards`|
|`--background-width`|`800px`|
|`--background--height`|`--box-height`|
|`--shimmer-gradient-color-start`|`#f6f7f8`|
|`--shimmer-gradient-color-end`|`#edeef1`|

---

## Development

### Local Development

- `npm i`
- `npm run start`

### Building the Stencil Component

- `npm run build`
- `npm publish` or `npm pack` for local deployments

### Testing
- `npm run test`

## Contributors

[Sean Perkins](https://github.com/sean-perkins) |
:---:
|[Sean Perkins](https://github.com/sean-perkins)|