avin / react-size-me

React component to determine parent container size

Home Page:https://avin.github.io/react-size-me

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-size-me

React component to determine parent container size

NPM registry NPM license

Demo

Here is an examples page

Install

# Yarn
yarn add @avinlab/react-size-me

# NPM
npm install --save @avinlab/react-size-me

Usage

import React from 'react';
import SizeMe from '@avinlab/react-size-me';

<div className="container">
    <SizeMe>
        {({ width, height }) => (
            <div className="inner" style={{ width, height }}/>                
        )}
    </SizeMe>
</div>

License

MIT © avin

About

React component to determine parent container size

https://avin.github.io/react-size-me


Languages

Language:JavaScript 94.9%Language:CSS 5.1%