ember-fake-content
v0.3.0
Published
Composable components for rendering animated content placeholders like facebook
Maintainers
Readme
ember-fake-content
Ember addon for rendering fake content while data is fetching to provide better UX and lower bounce rate.
:cd: Installation
ember install ember-fake-content
:rocket: Usage
{{#fake-content as |fake|}}
{{fake.heading img=true}}
{{fake.text lines="3"}}
{{/fake-content}}
{{#fake-content rounded=true as |fake|}}
{{fake.img}}
{{fake.heading}}
{{/fake-content}}
Available components and properties
root
fake-content- 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
- Boolean
yield
fake.heading- Boolean
img(default: false)
- Boolean
yield
fake.text- Number
lines(default: 4)
- Number
yield
fake.imgyield
fake.nav
TO DO:
fake.listfake.chartfake.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-fake-content-primary-color- heading background$ember-fake-content-secondary-color- light background$ember-fake-content-border-radius- border radius size whenroundedproperty istrue$ember-fake-content-line-height- single line height$ember-fake-content-spacing- distance between lines
🔓 License
See the LICENSE file for license rights and limitations (MIT).
