Package Exports
- ngxsmk-skeleton-loader
- ngxsmk-skeleton-loader/package.json
Readme
ðĶī ngxsmk-skeleton-loader
Angular 17+ standalone skeleton loader component & directive with SCSS animations (shimmer, pulse, wave). Lightweight, themeable, and designed for instant loading states.
âĻ Features
- ⥠Standalone Angular component â drop it anywhere, no NgModule needed
- ðĻ SCSS theming with CSS variables
- ð Animations: shimmer, pulse, wave
- ð§Đ Component + structural directive (
*ngxsmkSkeleton) - ðą Responsive and mobile-friendly
- âŋ Accessible (role="presentation")
- â SSR-safe (no direct DOM hacks)
ðĶ Installation
npm install ngxsmk-skeleton-loaderRequires Angular 17+.
ð Usage
Component
<ngxsmk-skeleton type="text" width="80%"></ngxsmk-skeleton>
<ngxsmk-skeleton type="circle" size="56"></ngxsmk-skeleton>
<ngxsmk-skeleton type="rect" width="100%" [height]="180"></ngxsmk-skeleton>Directive
<ng-container *ngxsmkSkeleton="loading; type: 'text'; width: '70%'">
<p>Loaded content appears here</p>
</ng-container>âïļ Inputs
| Input | Type | Default | Description |
|---|---|---|---|
type |
'text' | 'rect' | 'circle' | ... |
text |
Shape preset |
width |
string | number |
100% |
Width (string or px number) |
height |
string | number |
1rem |
Height |
size |
string | number |
â | Shortcut for width+height |
radius |
string | number |
auto | Border radius |
animate |
'shimmer' | 'pulse' | 'wave' | 'none' |
shimmer |
Animation style |
ðĻ Theming
Override CSS variables globally or per element:
ngxsmk-skeleton {
--ngx-skel-base: #e5e7eb;
--ngx-skel-highlight: #ffffffb3;
}ð Development
ng build ngxsmk-skeleton-loaderOutput in dist/ngxsmk-skeleton-loader/.
ðĶ Publish
cd dist/ngxsmk-skeleton-loader
npm publish --access publicðž Demo
Use the provided demo app:
ng serve ngxsmk-skeleton-demoThen open http://localhost:4200.
ð License
ð Community
If this saved you time, please â star the repo and share with fellow Angular devs!