Socket
Socket
Sign inDemoInstall

ngx-skeleton

Package Overview
Dependencies
5
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngx-skeleton

Angular placeholder preview component before the content is loaded


Version published
Weekly downloads
307
decreased by-38.35%
Maintainers
1
Install size
109 kB
Created
Weekly downloads
 

Readme

Source

ngx-skeleton

Angular placeholder preview component before the content is loaded.

npm NPM npm bundle size

Environment Support

  • Angular 6+
  • Server-side Rendering

Compatibility

Versions compatibility list:

ngx-skeletonAngular
16.x.x16.x.x
15.x.x15.x.x
14.x.x14.x.x
13.x.x13.x.x
12.x.x12.x.x
11.x.x11.x.x
1.x.x6.xx - 10.x.x

Installation

npm i ngx-skeleton

OR

yarn install ngx-skeleton

Demo

Demo page

Usage

Import NgxSkeletonModule into the current module's imports:

import { NgxSkeletonModule } from 'ngx-skeleton';

imports: [
  // ...
  NgxSkeletonModule,
],

You can also import NgxSkeletonComponent as standalone component:

import { NgxSkeletonComponent } from 'ngx-skeleton';

@Component({
  standalone: true,
  imports: [NgxSkeletonComponent],
  // ...
})
export class MyComponent {}

Use in your components (this is code example from demo page):

<ng-container *ngIf="!isLoading; else loadingContent">
  <h5>{{ movie.title }}</h5>
  <h6 class="text-black-50">{{ movie.date }}</h6>
</ng-container>
<ng-template #loadingContent>
  <ngx-skeleton height="24px" margin="0 0 8px 0" width="50%"></ngx-skeleton>
  <ngx-skeleton height="19px" margin="0 0 8px 0"></ngx-skeleton>
</ng-template>

API

Inputs

InputTypeDefault
animatebooleantrue
backgroundColorstring'rgba(0, 0, 0, 0.08)'
borderRadiusnumber | string0
heightnumber | string'100%'
marginnumber | string0
variant'rect' or 'circle''rect'
widthnumber | string'100%'

License

MIT

Keywords

FAQs

Last updated on 23 Sep 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc