GithubHelp home page GithubHelp logo

lucasleandro1204 / vue-content-loading Goto Github PK

View Code? Open in Web Editor NEW
759.0 9.0 79.0 3.04 MB

Vue component to easily build (or use presets) SVG loading cards Facebook like.

Home Page: https://lucasleandro1204.github.io/vue-content-loading/

License: MIT License

Vue 76.72% JavaScript 23.28%
vue svg facebook loading-animations loading card cards ui ux animation

vue-content-loading's Introduction

Vue Content Loading

Vue component to easily build or use presets for Facebook-like SVG loading cards.

Inspired in React Content Loader

So how does it look like?

Facebook

Facebook loading

Code

Code loading

Documentation & Examples

Documentation with all presets is available HERE

Installation

Simple installation via NPM

$ npm install vue-content-loading --save

License

This project is licensed under the MIT license. See the LICENSE file for more details

vue-content-loading's People

Contributors

binggg avatar boopathikumar018 avatar josephting avatar lucasleandro1204 avatar luizperes avatar maxtotterman avatar shaegi avatar tatyshev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vue-content-loading's Issues

nuxt warning

hi,
i have this warning using the plugin with nuxt:
You are using the runtime-only build of Vue where the template compiler is not available

the nuxt developer said thats a package error
you may delivery non built package

Using a % for width

Using a % for width throws this warning, but works fine, might want to allow the string with % in the prop validation.

[Vue warn]: Invalid prop: type check failed for prop "width". Expected Number with value NaN, got String with value "100%".

More presets

We need more presets, I can think in different types of lists, blog post placeholder and maybe a custom shape?

Implement Table Presets

Hi. Really nice piece of code!

I want to suggest the adiction of one "Preset" for Tables-like loading, with custom options to choose the line and columns number.

Thanks.

Skeleton screen loading management

I was also writing a Skeleton screen and encountered a problem.
After reading your code, my confusion is even greater. The skeleton screen needs a loading boolean value to determine whether to render. There will be many pages in a project, and a loading boolean needs to be bound to each page. This is a repeated declaration of loading. boolean.
There is another situation: there will be many AJax requests on a page, and each request will be a separate module on the page, and a separate module is a skeletal screen, which will cause more repeated work of declaring laoding boolean Therefore, all AJax requests for the page are placed in Promise.all. After all requests are successful, the page is displayed normally, otherwise the skeleton screen is displayed.
This is my doubt now, I don't want to repeatedly declare the loading boolean, so I don't know if you have a better solution

Broken module with vue3 beta

Hello i'm using this module with a vue3 instance and doesn't work... feel free to ask me anything to fix this.

Bug only on safari

Hi, can you help me with this? If I reload the page the loading come from this:
screenshot 2018-08-02 13 52 34

to this:
screenshot 2018-08-02 13 52 21

** This happening only on safari and only if I refresh the page (cmd + r "F5"), no errors or warnings on console.

Implement test

Are you thinking to implement tests on your application? I've never implemented tests on Vue, but I would like to help you if this issue is your roadmap :)

Good job!

Linting

Add linting following this other package vue-snippets

You can copy everything, but write some guide in readme please xd

Don't forget to add the scripts.

Next version

I'll be working on the next version in the next weeks
Feel free to share your ideas and thoughts =)

Docs

  • Change docs generator (vuepress)?
  • Review documentation and rewrite stuff
  • Add better examples
  • Loader editor (low priority)

Library

  • Drop default export
  • Update them to not use SVG as default

We should be able to import and use svg inside the loaders, but due to compatibility issues (#17) they won't be built with svg.

  • Rewrite components

They should be functional

  • New way to build loaders

Maybe an wrapper component that overlays elements

  • Add an way to control group of loaders easily
  • Add new components
  • Add tests

Doesn't work with flex-direction: row

I'm using Laravel mix with vue-content-loading": "^1.6.0 installed

<style scoped>
.flex-row {
  display: flex;
  flex-direction: row;
}
</style>

<template>
  <div class="flex-row">
    <vue-content-loading :width="300" :height="100">
      <circle cx="30" cy="30" r="30" />
      <rect x="75" y="13" rx="4" ry="4" width="100" height="15" />
      <rect x="75" y="37" rx="4" ry="4" width="50" height="10" />
    </vue-content-loading>
  </div>
</template>

<script>
  import VueContentLoading from 'vue-content-loading';
  export default {
    components: {
      VueContentLoading,
    }
  }
</script>

Nothing is rendered if I put vue-content-loading inside flex-direction: row styled parent element. It works with flex-direction: column

Any solutions?

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.