Licence
(MIT OR Apache-2.0)
Version
1.0.1
Deps
1
Size
5 kB
Vulns
0
Weekly
0
react-placeholder
React component which allows you to create dummy placeholders.
How install
npm i @markdijkstra/react-placeholder
How to use
import {Placeholder} from '@markdijkstra/react-placeholder'
const PlaceholderData = [
{
height : '150px',
width : '300px',
backgroundColor : '#eee',
borderColor : '#ccc',
textColor : '#aaa',
fontSize : '13px',
caption : 'placeholder caption'
}
];
<Placeholder options={PlaceholderData} className="my-placeholder"/>
Options
| option | default |
|---|---|
| height | 150px |
| width | 300px |
| backgroundColor | #eee |
| borderColor | #ccc |
| textColor | #aaa |
| fontSize | 13px |
| caption | height x width |
The value caption can be removed by setting it to 'false'.