Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-resizable

Package Overview
Dependencies
Maintainers
1
Versions
56
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-resizable

A component that is resizable with handles.

  • 3.0.5
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is react-resizable?

The react-resizable package provides a set of React components that can be used to create resizable elements. It is particularly useful for building user interfaces where elements need to be resized by the user, such as in dashboards, forms, or any interactive layout.

What are react-resizable's main functionalities?

Resizable Component

The ResizableBox component allows you to create a resizable element. You can specify constraints such as minimum and maximum width and height.

import React from 'react';
import { ResizableBox } from 'react-resizable';

const ResizableComponent = () => (
  <ResizableBox width={200} height={200} minConstraints={[100, 100]} maxConstraints={[300, 300]}>
    <div style={{ width: '100%', height: '100%', border: '1px solid black' }}>
      Resizable Content
    </div>
  </ResizableBox>
);

export default ResizableComponent;

Resizable Handle

The ResizableBox component can also accept a custom handle for resizing. This allows for more control over the appearance and behavior of the resize handle.

import React from 'react';
import { ResizableBox } from 'react-resizable';

const ResizableHandleComponent = () => (
  <ResizableBox
    width={200}
    height={200}
    minConstraints={[100, 100]}
    maxConstraints={[300, 300]}
    handle={<span className="custom-handle" />}
    handleSize={[8, 8]}
  >
    <div style={{ width: '100%', height: '100%', border: '1px solid black' }}>
      Resizable Content with Custom Handle
    </div>
  </ResizableBox>
);

export default ResizableHandleComponent;

Other packages similar to react-resizable

Keywords

FAQs

Package last updated on 21 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc