get-size-module
TypeScript icon, indicating that this package has built-in type declarations

0.2.1 • Public • Published

getSizeModule

Get the size of elements.

var size = getSize( elem );
// elem can be an element
var size = getSize( document.querySelector('.selector') )
// elem can be a selector string
var size = getSize('.selector')

Returns an object with:

  • width, height
  • innerWidth, innerHeight
  • outerWidth, outerHeight
  • paddingLeft, paddingTop, paddingRight, paddingBottom
  • marginLeft, marginTop, marginRight, marginBottom
  • borderLeftWidth, borderTopWidth, borderRightWidth, borderBottomWidth
  • isBorderBox

Browser support: Chrome 51+, Firefox 50+, Edge 12+, Safari 10+,

Install

npm: npm install get-size-module

Yarn: yarn add get-size-module

MIT License

getSize is released under the MIT License. Have at it.

Readme

Keywords

Package Sidebar

Install

npm i get-size-module

Weekly Downloads

0

Version

0.2.1

License

MIT

Unpacked Size

42.3 kB

Total Files

23

Last publish

Collaborators

  • akbarsv