Standalone version of the AutoSizer component from react-virtualized
See the code
react-virtualized-auto-sizer: Measures the available width and height of an HTMLElement and passes those values as props to a Child component. Refer to the docs for usage examples.
[!NOTE] This package began as a fork of the
AutoSizercomponent from react-virtualized, and was intended for use with earlier versions of react-window. More recent versions ofreact-windowuseResizeObservernatively and do not require this package.
npm install --save react-virtualized-auto-sizer
Frequently asked questions can be found here.
Measures the available width and height of its parent HTMLElement and passes those values as width and height props to its children.
ℹ️ This component began as a fork of the javascript-detect-element-resize package.
None
| Name | Description |
|---|---|
| box | Corresponds to the
|
| className | Class name to be applied to the auto-sizer |
| data-testid | Test id attribute to interop with frameworks like Testing Library. |
| id | Unique id attribute to attach to root DOM element. |
| nonce | Nonce used for inline |
| onResize | Optional callback notified after a resize. @param size New width and height of parent element |
| style | Style properties to be applied to the auto-sizer |
| tagName | Optional HTML tag name for root HTMLElement; defaults to |
| Child | Child component to be passed the available width and height values as props.
@deprecated Use the |
| ChildComponent | Child component to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
| renderProp | Render prop to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
Overall
Maintained
Code review
Latest release
Releases this year
554 followers · starred Apr 2023
177 followers · starred Jun 2018
43 followers · starred Sep 2023
67 followers · starred Apr 2023
Standalone version of the AutoSizer component from react-virtualized
See the code
react-virtualized-auto-sizer: Measures the available width and height of an HTMLElement and passes those values as props to a Child component. Refer to the docs for usage examples.
[!NOTE] This package began as a fork of the
AutoSizercomponent from react-virtualized, and was intended for use with earlier versions of react-window. More recent versions ofreact-windowuseResizeObservernatively and do not require this package.
npm install --save react-virtualized-auto-sizer
Frequently asked questions can be found here.
Measures the available width and height of its parent HTMLElement and passes those values as width and height props to its children.
ℹ️ This component began as a fork of the javascript-detect-element-resize package.
None
| Name | Description |
|---|---|
| box | Corresponds to the
|
| className | Class name to be applied to the auto-sizer |
| data-testid | Test id attribute to interop with frameworks like Testing Library. |
| id | Unique id attribute to attach to root DOM element. |
| nonce | Nonce used for inline |
| onResize | Optional callback notified after a resize. @param size New width and height of parent element |
| style | Style properties to be applied to the auto-sizer |
| tagName | Optional HTML tag name for root HTMLElement; defaults to |
| Child | Child component to be passed the available width and height values as props.
@deprecated Use the |
| ChildComponent | Child component to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
| renderProp | Render prop to be passed the available width and height values as props. ℹ️ Use ⚠️ Width and height are undefined during the during the initial render (including server-rendering). |
Overall
Maintained
Code review
Latest release
Releases this year
554 followers · starred Apr 2023
177 followers · starred Jun 2018
43 followers · starred Sep 2023
67 followers · starred Apr 2023