🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

use-element-fit

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

use-element-fit - npm Package Compare versions

Comparing version
0.3.0
to
0.4.0
+7
-2
package.json
{
"name": "use-element-fit",
"version": "0.3.0",
"description": "use-element-fit",
"version": "0.4.0",
"description": "useElementFit is a React hook that allows you to measure and element's based on certain restraints, similar to object-fit in CSS.",
"keywords": [
"resize-observer",
"object-fit",
"background-size"
],
"main": "dist/index.js",

@@ -6,0 +11,0 @@ "types": "dist/index.d.ts",

@@ -7,4 +7,7 @@ [![Build Status](https://travis-ci.com/art0rz/use-element-fit.svg?branch=master)](https://travis-ci.com/art0rz/use-element-fit)

# Motivation
Working with canvas or more complex uses of `object-fit` often makes it useful to calculate the width/height and x/y values of a element or object, this effect helps you do this.
# Usage
See `useElementFit` in [action](https://art0rz.github.io/use-element-fit/)
```js

@@ -11,0 +14,0 @@ import React from 'react';