SVG Component To Create Placeholder Content Loader In Angular

An angular component that uses SVG to create a set of loaders that simulate the structure of the content to be loaded, similar to Facebook card loaders.

ngneatcontent loader, angular svg loader, react native svg loader, react content loader, content loader in angular, ngx skeleton loader, content loader npm

Features

This is an angular port for the interaction content loader.

  • ⚙️Fully customizable: you can change colors, speed, and sizes.
  • ✏️ Create your own upload: use our interactive content creator to easily create custom uploads.
  • 👌 You can use it now: there are a lot of presets to use the loader, see options.
  • 🚀 Performance: It uses pure SVG to work, so it works without any extra scripts, canvas, etc.

A Fully Customizable Loader/Spinner For Angular | ngx-ui-loader

How to make use of it:

Install

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>

API

@Inputs

Prop name and type
EnvironmentDescription
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 commonly used as: 
<ContentLoader baseUrl={window.location.pathname} /> which will fill the SVG attribute with the relative path.
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.
gradientRatio?: number
Defaults to 1.2
The width of the animated gradient is a fraction of the view box width.
rtl?: boolean
Defaults to false
Content right-to-left.
backgroundColor?: string
Defaults to #f5f6f7
Used as the 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 {}

Angular SVG Content Loader Plugin/Github


See Demo And Download

Official Website(ngneat): Click Here

This superior jQuery/javascript plugin is developed by ngneat. For extra advanced usage, please go to the official website.

Related Posts

Fullscreen-Lightbox-Plugin

Simple And Powerful Fullscreen Lightbox Plugin | fslightbox

Fullscreen Lightbox Basic is a modern and handy plug-in for displaying photos and videos in a clean overlay box. Showcase a single source or create a great…

product-thumbnail-slider-with-zoom-effect-jquery

Product Thumbnail Slider With Positive Zoom Effect jQuery

Positive Zoom is a JavaScript library for creating an image gallery where you can zoom in on the current image by hovering over it. Must Read: Pure…

CSS-Gauge-Meter

Create Responsive Gauge Meter Using Pure CSS | CSSGauge

Pure CSS Gauge Meter Component, no SVG, or artboard is used in this component. This component can be easily distinguished by overriding the default style rules and…

bulma-datepicker

Versatile Date and Time Picker Calendar for Bulma

Bulma extension for calendar display can be used on a page as a large calendar with appointments or as a date picker/popup window. A responsive, customizable, and…

javascript-time-series-chart-library

Simple Time-Series Chart Viewer with HTML5 Canvas Javascript Library

Pixl chart library displays time series charts in the browser, using the HTML5 Canvas element. It is designed to be lightweight and efficient, while still providing a…

Neumorphic-Design-CSS

Neumorphic Design Inspiration Style CSS Shapes | Neumorphism

Multi-dimensional design is inspired by the physical world and adds textures, reflection, shadows, layers, and depths to the flat design making the UI elements more visible. CSS…