ProductPromotion
Logo

Angular.JS

made by https://0x3d.site

GitHub - ngneat/content-loader: ⚪️ SVG component to create placeholder loading, like Facebook cards loading.
⚪️ SVG component to create placeholder loading, like Facebook cards loading.  - GitHub - ngneat/content-loader: ⚪️ SVG component to create placeholder loading, like Facebook cards loading.
Visit Site

GitHub - ngneat/content-loader: ⚪️ SVG component to create placeholder loading, like Facebook cards loading.

GitHub - ngneat/content-loader: ⚪️ SVG component to create placeholder loading, like Facebook cards loading.

Angular Content Loader

All Contributors

Angular component that uses SVG to create a collection of loaders which simulates the structure of the content that will be loaded, similar to Facebook cards loaders.

Live Demo

Sponsoring ngneat

Sponsorships aid in the continued development and maintenance of ngneat libraries. Consider asking your company to sponsor ngneat as its core to their business and application development.

Gold Sponsors

Elevate your support by becoming a Gold Sponsor and have your logo prominently featured on our README in the top 5 repositories.

Silver Sponsors

Boost your backing by becoming a Gold Sponsor and enjoy the spotlight with your logo prominently showcased in the top 3 repositories on our README.

Bronze Sponsors

Become a bronze sponsor and get your logo on our README on GitHub.

Features

This is an Angular port for react-content-loader.

  • :gear: Completely customizable: you can change the colors, speed and sizes;
  • :pencil2: Create your own loading: use the create-react-content-loader to create your custom loadings easily;
  • :ok_hand: You can use right now: there are a lot of presets to use the loader, see the options;
  • :rocket: Performance: uses pure SVG to work, so it works without any extra scripts, canvas, etc;

Install

Yarn

yarn add @ngneat/content-loader

Usage

import { ContentLoaderModule } from '@ngneat/content-loader';

@NgModule({
  imports: [ContentLoaderModule]
})
export class AppModule {}
<content-loader>
  <svg:rect x="0" y="0" rx="3" ry="3" width="250" height="10" />
  <svg:rect x="20" y="20" rx="3" ry="3" width="220" height="10" />
  <svg:rect x="20" y="40" rx="3" ry="3" width="170" height="10" />
  <svg:rect x="0" y="60" rx="3" ry="3" width="250" height="10" />
  <svg:rect x="20" y="80" rx="3" ry="3" width="200" height="10" />
  <svg:rect x="20" y="100" rx="3" ry="3" width="80" height="10" />
</content-loader>

Warning: Safari renders the SVG in black in case your Angular application uses the <base href="/" /> tag in the <head/> of your index.html. Refer to the input property baseUrl below to fix this issue.

Examples

Facebook Style

<facebook-content-loader></facebook-content-loader>

Facebook Style

List Style

<list-content-loader></list-content-loader>

List Style

Bullet list Style

<bullet-list-content-loader></bullet-list-content-loader>

Bullet list Style

API

@Inputs

Prop name and type Environment Description
animate?: boolean Defaults to true - Opt-out of animations with false
baseUrl?: string Defaults to an empty string - Required if you're using <base url="/" /> document <head/>. This prop is common used as: <ContentLoader baseUrl={window.location.pathname} /> which will fill the SVG attribute with the relative path. Related #93.
speed?: number Defaults to 1.2 - Animation speed in seconds.
interval?: number Defaults to 0.25 - Interval of time between runs of the animation, as a fraction of the animation speed.
viewBox?: string Defaults to undefined - Use viewBox props to set a custom viewBox value, for more information about how to use it, read the article How to Scale SVG.
gradientRatio?: number Defaults to 1.2 - Width of the animated gradient as a fraction of the view box width.
rtl?: boolean Defaults to false - Content right-to-left.
backgroundColor?: string Defaults to #f5f6f7 - Used as background of animation.
foregroundColor?: string Defaults to #eee - Used as the foreground of animation.
backgroundOpacity?: number Defaults to 1 - Background opacity (0 = transparent, 1 = opaque)used to solve an issue in Safari
foregroundOpacity?: number Defaults to 1 - Animation opacity (0 = transparent, 1 = opaque)used to solve an issue in Safari
style?: CSSProperties Defaults to {} -

Credits

This is basically an Angular port for react-content-loader.

License

MIT © NetanelBasal

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory