
Research
Security News
Malicious npm Package Wipes Codebases with Remote Trigger
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
react-svg-connector
Advanced tools
React component to draw svg connectors between any React components
React component to draw svg connectors to connect any React components
npm install react-svg-connector
or
yarn add react-svg-connector
Component props:
optional
): 's' | 'narrow-s' | 'line'
optional
): 'r2l' | 'l2l' | 'r2r' | 'l2r' |'b2t' | 'b2b' | 't2b' | 't2t'
optional
): true | false
optional
): number of grid, used to calculate step = distanceX(Y) / grid
optional
): min value for the step
Please run a full example to see all available props.
S shape
narrow-s shape
const Wrapper = styled.div`
position: relative;
height: 100vh;
overflow: auto;
`;
const Box = styled.div`
width: 150px;
height: 50px;
cursor: pointer;
`;
const Box1 = styled(Box)`
background-color: green;
`;
const Box2 = styled(Box)`
background-color: red;
`;
function App() {
const ref1 = useRef();
const ref2 = useRef();
const [draw, redraw] = useState(0);
useEffect(() => {
redraw(Math.random());
}, [ref1, ref2])
return (
<Wrapper>
<Connector
el1={ref1.current}
el2={ref2.current}
shape="narrow-s"
direction="r2l" // "l2l", "r2r", "l2l"
roundCorner={true}
/>
<Box1 ref={ref1} />
<Box2 ref={ref2} />
</Wrapper>
);
}
FAQs
React component to draw svg connectors between any React components
The npm package react-svg-connector receives a total of 366 weekly downloads. As such, react-svg-connector popularity was classified as not popular.
We found that react-svg-connector 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.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.
Security News
New CNA status enables OpenJS Foundation to assign CVEs for security vulnerabilities in projects like ESLint, Fastify, Electron, and others, while leaving disclosure responsibility with individual maintainers.