Web component that allows you to render shimmer UI in your web (and Ionic native) applications.
npm install @teamhive/stencil-shimmer
<hive-shimmer width="100%/50px/50" shape="line/box/circle"></hive-shimmer>
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';
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 |
npm i
npm run start
npm run build
npm publish
ornpm pack
for local deployments
npm run test
Sean Perkins |