Giter Site home page Giter Site logo

laurenbarker / ember-content-placeholders Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cos-forks/ember-content-placeholders

0.0 2.0 0.0 156 KB

Composable components for rendering fake (progressive) content like facebook

License: MIT License

JavaScript 64.13% HTML 16.70% CSS 19.17%

ember-content-placeholders's Introduction

ember-content-placeholders

NPM version Build Status

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

๐Ÿ’ฟ Installation

  • ember install ember-content-placeholders

๐Ÿš€ Usage

{{#content-placeholders as |placeholder|}}
  {{placeholder.heading img=true}}
  {{placeholder.text lines=3}}
{{/content-placeholders}}

rendered example

{{#content-placeholders rounded=true as |placeholder|}}
  {{placeholder.img}}
  {{placeholder.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)

    properties from root component are automatically passed down to each one of yielded components, so they can be overriden whenever necessary per comoponent case

  • yield placeholder.heading

    • Boolean img (default: false)
  • yield placeholder.text

    • Number lines (default: 4)
  • yield placeholder.img

  • yield placeholder.nav

TO DO:

  • placeholder.list
  • placeholder.chart
  • placeholder.table

Customization

Composable components make it easy to form a required module, but sometimes it's not enough. If you'd like to also amend styling, there are few variables that can help you out:

  • $ember-content-placeholders-primary-color - heading background
  • $ember-content-placeholders-secondary-color - light background
  • $ember-content-placeholders-border-radius - border radius size when rounded property is true
  • $ember-content-placeholders-line-height - single line height
  • $ember-content-placeholders-spacing - distance between lines

๐Ÿ”“ License

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

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.