Skip to content

Latest commit

 

History

History
25 lines (19 loc) · 401 Bytes

File metadata and controls

25 lines (19 loc) · 401 Bytes

React AutoSize Container

AutoSize component provide dimensions of container

Getting started

yarn add react-autosize-container --save

Usage

import { AutoSize } from 'react-autosize-container'

export const TestExample = () => (
  <AutoSize>
    {({ width, height }) => (
      <span>
        My container is {width}px x {height}px
      </span>
   )}  
  </AutoSize>
)