Make html to be measurable written by React
npm install html-measure
# or use yarn
yarn add html-measure
import HtmlMeasure from 'html-measure'
import 'html-measure/style.css'
// or
import 'html-measure/style.less'
ReactDOM.render(<HtmlMeasure html="<div>foo</div>" />, window.root)
- Type:
string
- Type:
object
- Type:
string
- Type: one of
'px' | 'rem'
- Default:
'px'
- Type:
number
- Default:
16
The size of the red rect in the above picture.
- Type:
number
- Default:
10
- Type:
boolean
- Default:
true
- Type:
boolean
- Default:
true
- Type:
number
- Default:
0
This library is written and maintained by imcuttle, moyuyc95@gmail.com.
MIT