An open API service indexing awesome lists of open source software.

https://github.com/niexq/react-auto-sizer

🧗‍♂️ 自动计算宽高的react组件(React components that automatically calculate width and height)
https://github.com/niexq/react-auto-sizer

auto-sizer react-resizeobserver resizeobserver

Last synced: about 1 year ago
JSON representation

🧗‍♂️ 自动计算宽高的react组件(React components that automatically calculate width and height)

Awesome Lists containing this project

README

          





Welcome to react-auto-sizer 👋



Version

Documentation


Maintenance


Maintenance


License: MIT


Gitmoji

> React components that automatically calculate width and height

[ 简体中文 ](./README.md) | English

### 🏠 [Homepage](https://niexq.github.io/react-auto-sizer)

![](https://raw.githubusercontent.com/niexq/picbed/main/picgo/react-auto-sizer-en-US.gif)

### 📦 Install

```bash
yarn add @oyyds/react-auto-sizer # or npm i @oyyds/react-auto-sizer -S
```

### 🔨 Use

```tsx | pure
import AutoSizer from '@oyyds/react-auto-sizer';

const AutoSizeComponent = () => {
return (



{({ width, height }) => (

Content area

)}


);
};
```

## 🦧 Author

- Website: https://juejin.cn/user/4318537404123688/posts
- Github: [@niexq](https://github.com/niexq)

## 🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check [issues page](https://github.com/niexq/react-auto-sizer/issues).

## ❤️ Show your support

Give a ⭐️ if this project helped you!

## 📝 License

This project is [MIT](https://github.com/niexq/react-auto-sizer/blob/main/LICENSE) licensed.

## 🐳 Link

[react-virtualized-auto-sizer](https://github.com/bvaughn/react-virtualized-auto-sizer)
[ResizeObserver](https://developer.mozilla.org/zh-CN/docs/Web/API/ResizeObserver)

## 🌐 Browsers support

| Chrome
Chrome | IE / Edge
Edge | Firefox
Firefox | Safari
Internet Explorer | Opera
Opera | Safari
Safari | Safari
WebView Android | Chrome
Chrome Android | Firefox
Firefox Android | Opera
Opera Android | Safari
Safari iOS | Samsung
Samsung Internet |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
| 64 | 79 | 69 | ❌ | 51 | 13.1 | 64 | 64 | 79 | 47 | 13.4 | 9.0 |