
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
react-align
Advanced tools
A highly customizable and powerful drag 'n drop align system for React.
<div style={{ width: "100vw", height: "100vh" }}>
// element containing GridWrapper needs to set the width and height
<GridWrapper>
<GridSection>
<GridArea location={{ section: "left", area: "top" }}>
<GridItem
id="1234"
index={1}
minH={100}
maxH={150}
minW={100}
maxW={150}
onReorder={YourReorderCallbackFunction}
onMoveArea={YourMoveAreaCallback}>
...your component
</GridItem>
</GridArea>
</GridSection>
</GridWrapper>
</div>
All props used in the example above are mandatory.
Location is based on a section/area combo that allows for unique grid layouts. The drag n drop will recognize the GridAreas based on your own desired naming convention that makes sense with your layout.
GridItem's id, index, onReorder and onMoveArea are necessary for the drag n drop as well. The id and index are presumed to be needed in your onMoveArea and OnReorder callback functions, respectively, as a way to manipulate your unique data. Types necessary for the callbacks are:
type onReorder: (
id?: string,
originalLocation?: { section: string, area: string },
currentIndex?: number,
hoverIndex?: number
) => void;
onMoveArea: (
currentItem?: string,
dropLocation?: { section: string, area: string},
originalLocation?: { section: string, area: string}
) => void;
Finally, the min/max for width and height is expected to set the GridItem container that will dynamically shrink when space is limited or if you choose to allow your GridItems to extend.
Re:Align's editor mode is easily toggleable by passing an enabled prop to the GridWrapper.
(If you want to use your own method and/or avoid style changes between editor mode and non-editor mode, pass draggable into GridItem and droppable into GridArea to enable drag 'n drop functionality directly)
Enjoy!
FAQs
A highly customizable and powerful drag 'n drop align system for React.
The npm package react-align receives a total of 216 weekly downloads. As such, react-align popularity was classified as not popular.
We found that react-align demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.