https://github.com/mts88/placeholder-content-loader
Pre-configured component of library ngneat/content-loader.
https://github.com/mts88/placeholder-content-loader
angular card content-loader facebook-loading loading placeholder-component table
Last synced: 3 months ago
JSON representation
Pre-configured component of library ngneat/content-loader.
- Host: GitHub
- URL: https://github.com/mts88/placeholder-content-loader
- Owner: mts88
- License: mit
- Created: 2021-02-21T19:16:41.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-01-30T22:08:53.000Z (over 3 years ago)
- Last Synced: 2024-04-24T01:20:29.987Z (about 1 year ago)
- Topics: angular, card, content-loader, facebook-loading, loading, placeholder-component, table
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/placeholder-content
- Size: 1.63 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Placeholder Content Loader
[](https://github.com/tterb/atomic-design-ui/blob/master/LICENSEs) [](https://circleci.com/gh/mts88/placeholder-content-loader) [](http://commitizen.github.io/cz-cli/) [](https://github.com/semantic-release/semantic-release) [](https://GitHub.com/mts88/placeholder-content-loader/releases/) [](https://opensource.org/)
This library is a simple collection of placeholder components, realized with the library [ngneat/content-loader](https://github.com/ngneat/content-loader).
## Installation
In order to install:
```shell
npm install --save placeholder-content
```## How to use it?
Import the module `PlaceholderContentModule` where do you need:
```typescript
import {
PlaceholderContentModule,
PlaceHolderColor,
} from 'placeholder-content';const placeholderColorScheme: PlaceHolderColor = {
DARK: {
background: '#333333',
foreground: '#373737',
},
LIGHT: {
background: '#eeeeee',
foreground: '#e3e3e3',
},
};@NgModule({
declarations: [AppComponent],
imports: [
BrowserModule,
AppRoutingModule,
PlaceholderContentModule.forRoot({
theme: 'dark',
colorScheme: placeholderColorScheme,
}),
// other imports...
],
providers: [],
bootstrap: [AppComponent],
})
export class AppModule {}
```### Usage
In your html use component:
```html
```You can use these input for each component:
| Name | Type | Description |
|--|--| -- |
| theme | `ThemeSchema` | Theme of single placeholder (override global config).
_Default_: `'dark'` |
| animate | `boolean` | Animation of placeholder.
_Default_: `true` |
| speed | `number` | Speed of animation.
_Default_: `2`
| containerClass | `string` or `Array` | Custom classes for placeholder container.
_Default_: `[]`## Components
List of components:
- [Card](#card)
- [Form](#form)
- [Info](#info)
- [Table](#table)### Card

```html
```### Form

```html
```### Info

```html
```### Table

```html
```## Compatibility
- `@angular/core`: `^11.0.0` (not tested with 9 and 10)
## Credits
[ngneat/content-loader](https://github.com/ngneat/content-loader)
## License
MIT