https://github.com/capaj/react-resizer
dead simple react component for resizeable container
https://github.com/capaj/react-resizer
reactjs resize resizer typescript vitejs
Last synced: about 2 months ago
JSON representation
dead simple react component for resizeable container
- Host: GitHub
- URL: https://github.com/capaj/react-resizer
- Owner: capaj
- Created: 2024-02-03T08:08:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-02-03T09:21:12.000Z (over 2 years ago)
- Last Synced: 2025-02-01T18:45:20.683Z (over 1 year ago)
- Topics: reactjs, resize, resizer, typescript, vitejs
- Language: TypeScript
- Homepage: https://capaj.github.io/react-resizer/
- Size: 158 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# react-resizer
a simple react component which allows user to resize the component container in two direction.
⚠️ distribution on npm only has ESM version of the package. If you need CJS version you cannot use this.
## Installation
You can install it with pnpm:
```bash
pnpm i @capaj/react-resizer
```
## Usage
```tsx
import { Resizer } from "@capaj/resizer"
function App() {
return (
<>
Resize me
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla
tincidunt, libero a facilisis ultrices, ipsum nunc aliquam libero,
vitae interdum libero nunc eget purus. Sed nec odio auctor, ultrices
libero vitae, cursus libero. Nulla facilisi. Nulla facilisi. Nulla
facilisi. Nulla facilisi. Nulla facilisi. Nulla facilisi. Nulla
>
)
}
```
all elements have classes, so you can style them any way you like:
- `resizer`
- `resizer container`
- `resizer horizontal handle`
- `resizer vertical handle`
- `resizer diagonal handle`