GithubHelp home page GithubHelp logo

mainawycliffe / angular-animated-ghost-elements Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomasburleson/angular-animated-ghost-elements

0.0 1.0 0.0 320 KB

Demonstrate use of ghost (aka skeleton) elements in Angular UX and animated with @angular/animations

CSS 28.07% HTML 13.09% TypeScript 58.84%

angular-animated-ghost-elements's Introduction

Animated Ghost-Elements in Angular

image

Sometimes referred to as ‘skeletons’, ghost elements are gray-box representations of pending UI that will be available in the future; once async data is loaded or perhaps a lazy-loaded module is ready.

Ghost elements are very useful for implementations of complex tables and other UX where data loads are not trivial.

While many applications [most notably Slack and Facebook] incorporate UX with skeletons and CSS, the Angular developer community has yet to discuss this technique in any detail.


Blog at Angular-in-Depth

image

Hosted PWA Demo

https://angular-animated-ghost-list.firebaseapp.com/


Approaches

Ghost views can be used in three (3) ways:

  1. Separate, distinct overlays that of DOM elements used in place of the 'real' elements (DOM)
  2. Inline-elements that either show ghosts or 'real' data
  3. Inline Ghosts with AsyncItem wrappers

For lists or tables, ghost elements can be especially challenging to implement.

The advantage of (1) is that developers have maximum power to animated the ghost elements and the real elements simultaneously. Especially for lists, where developers may want to stagger items as the :enter or :leave.

This repository demonstrates ideas on how to partition, implement, and animate ghost elements... implemented with Angular 7.x and @angular/animations.


StackBlitz Demo

1.) Animated Ghosts Overlay

image


2.) Animated Inline Ghosts

image


3.) Animated Ghosts + AsyncItem

image


Learning Resources

angular-animated-ghost-elements's People

Contributors

thomasburleson avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.