A skeleton loader specifically designed for Angular Application. It contains skeleton components for Angular Material Design.
npm install angular-skeleton-loader
We all love the Angular Material Design System. Its fast, easy to set up and consists of all the components that one needs. Angular Skeleton Loader consists of skeleton loaders for commonly used Angular Material components.
Type the following command to install the package:
``shell`
npm install angular-skeleton-loader
Import the AngularRectangleSkeletonModule into your component module like
`typescript
import {AngularRectangleSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularRectangleSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-----------|---------|-----------|----------------------------------------------------------------|
| animate | boolean | true | true, false |"100px"
| width | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |"2em"
| height | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |
Import the AngularSquareSkeletonModule into your component module like
`typescript
import {AngularSquareSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularSquareSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-----------|---------|----------|----------------------------------------------------------------|
| animate | boolean | true | true, false |"80px"
| size | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |
Import the AngularCircleSkeletonModule into your component module like
`typescript
import {AngularCircleSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularCircleSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-----------|---------|----------|----------------------------------------------------------------|
| animate | boolean | true | true, false |"80px"
| radius | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |
Import the AngularChipSkeletonModule into your component module like
`typescript
import {AngularChipSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularChipSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
>
#### Props:
| Parameter | Type | Default | Accepted Values |
|-------------|---------|-----------|----------------------------------------------------------------|
| animate | boolean | true | true, false |"100px"
| width | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |"2em"
| height | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |1
| chips | number | | 0 to Inf |false
| randomWidth | boolean | | true, false |
If randomWidth prop is true creates chip/s of random sizes ranging from 150px to 100px;
Here is a list of pre-made component if you would like to use them in your application
Import the AngularLineSkeletonModule into your component module like
`typescript
import {AngularLineSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularLineSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-------------|---------|----------|----------------------------------------------------------------|
| animate | boolean | true | true, false |"100%"
| width | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |"1em"
| height | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |2
| lines | number | | 0 to Inf |
Import the AngularInputSkeletonModule into your component module like
`typescript
import {AngularInputSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularInputSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-----------------|---------|---------|-----------------|
| animate | boolean | true | true, false |true
| withPlaceholder | boolean | | true, false |
Import the AngularCardSkeletonModule into your component module like
`typescript
import {AngularCardSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularCardSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-----------------|---------|---------|-----------------|
| animate | boolean | true | true, false |
Import the AngularTableSkeletonModule into your component module like
`typescript
import {AngularTableSkeletonModule} from 'angular-skeleton-loader';
@NgModule({
imports: [
AngularTableSkeletonModule,
]
})
`
Update your HTML code to use the component that you like
`html`
#### Props:
| Parameter | Type | Default | Accepted Values |
|-------------------------|----------|---------------------------------------|-------------------------------------------------------------------------------------------------|
| animate | boolean | true | true, false |"100%"
| width | string | | "200px", "2em", "100%", "fit-content", "auto", "0" |5
| rows | number | | 0 to Inf |4
| columns | number | | 0 to Inf |['35%', '10%', '10%', '15%', '15%']
| columnWidthDistribution | string[] | | "200px", "2em", "100%", "fit-content", "auto", "0"` in an array (Ideally percentage) |
This package is still a work in progress. An extensive list of components that include most if not all the components of Angular Material Design System.
Any suggestions, or component requests will be highly appreciated. Thank you!