vue-content-placeholders

Composable components for rendering fake (progressive) content like facebook in vue

Github星跟踪图

vue-content-placeholders

npm
vue2

Vue addon for rendering fake content while data is fetching to provide better UX and lower bounce rate.

example


:cd: Installation

  • via npm: npm install vue-content-placeholders --save
  • via yarn: yarn add vue-content-placeholders

:rocket: Usage

Include plugin in your main.js file.

import Vue from 'vue'
import VueContentPlaceholders from 'vue-content-placeholders'

Vue.use(VueContentPlaceholders)

⚠️ A css file is included when importing the package. You may have to setup your bundler to embed the css in your page.

Examples:

<content-placeholders>
  <content-placeholders-heading :img="true" />
  <content-placeholders-text :lines="3" />
</content-placeholders>

rendered example

<content-placeholders :rounded="true">
  <content-placeholders-img />
  <content-placeholders-heading />
</content-placeholders>

rendered example

Available components and properties

  • root <content-placeholders>

    • Boolean animated (default: true)
    • Boolean rounded (default: false) - border radius
    • Boolean centered (default: false)

    these properties define how all children components will act

  • <content-placeholders-heading />

    • Boolean img (default: false)
  • <content-placeholders-text />

    • Number lines (default: 4)
  • <content-placeholders-img />


? License

See the LICENSE file for license rights and limitations (MIT).

主要指标

概览
名称与所有者michalsnik/vue-content-placeholders
主编程语言JavaScript
编程语言JavaScript (语言数: 3)
平台
许可证MIT License
所有者活动
创建于2017-10-09 19:13:54
推送于2024-08-19 20:32:31
最后一次提交2017-11-13 11:14:49
发布数0
用户参与
星数1.6k
关注者数11
派生数88
提交数9
已启用问题?
问题数13
打开的问题数8
拉请求数0
打开的拉请求数5
关闭的拉请求数3
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?