
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
react-curved-div
Advanced tools
The BentRectangle component is a customizable React component that renders a rectangle with bent edges. It supports various configurations for corner radii, edge bending, and styling, making it highly versatile for creating unique UI elements.

To install the package, use npm or yarn:
npm install react-curved-div
Checkout Some Examples Live On Website.
Import the BentRectangle component into your React project:
import React from "react";
import { BentRectangle } from "react-curved-div";
const App = () => (
<BentRectangle
topLeftCornerRadius={10}
topRightCornerRadius={10}
bottomLeftCornerRadius={20}
bottomRightCornerRadius={20}
topBendPercent={10}
bottomBendPercent={15}
leftBendPercent={5}
rightBendPercent={5}
bendDirection="outward"
className="custom-shape"
style={{ backgroundColor: "lightblue" }}
contentClassName="custom-content"
contentStyle={{ padding: "20px" }}
isFullWidthOfParent={true}
isFullHeightOfParent={true}
>
<p>This is a bent rectangle with custom styles and content.</p>
</BentRectangle>
);
export default App;
topLeftCornerRadius (number): Radius for the top-left corner of the shape (in pixels). Default is 0.topRightCornerRadius (number): Radius for the top-right corner of the shape (in pixels). Default is 0.bottomLeftCornerRadius (number): Radius for the bottom-left corner of the shape (in pixels). Default is 0.bottomRightCornerRadius (number): Radius for the bottom-right corner of the shape (in pixels). Default is 0.topBendPercent (number): Percentage of the width to bend the top edge of the shape. Values should be between 0 and 100. Default is 0.bottomBendPercent (number): Percentage of the width to bend the bottom edge of the shape. Values should be between 0 and 100. Default is 0.leftBendPercent (number): Percentage of the height to bend the left edge of the shape. Values should be between 0 and 100. Default is 0.rightBendPercent (number): Percentage of the height to bend the right edge of the shape. Values should be between 0 and 100. Default is 0.children (React.ReactNode): React children to be rendered inside the shape.className (string): Additional class name(s) to apply to the shape container. Default is an empty string.style (React.CSSProperties): Inline styles to apply to the shape container. Excludes properties related to positioning and layout.contentClassName (string): Additional class name(s) to apply to the content inside the shape. Default is an empty string.contentStyle (React.CSSProperties): Inline styles to apply to the content inside the shape. Excludes properties related to masking, positioning, and overflow.isFullWidthOfParent (boolean): Whether the shape should take the full width of its parent container. Default is false.isFullHeightOfParent (boolean): Whether the shape should take the full height of its parent container. Default is false.bendDirection ("inward" | "outward"): Direction of the bend for the edges of the shape. Can be either "inward" or "outward". Default is "inward".ResizeObserver to dynamically adjust the size of the shape based on its container or parent dimensions.Below are some example images showcasing the BentRectangle component you can use for:
Inward Bending:

Outward Bending:

isFullWidthOfParent or isFullHeightOfParent.This project is licensed under the MIT License.
FAQs
A simple react component to create a curved div
We found that react-curved-div demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.