JSPM

svg-arrow

2.0.2
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q34466F
  • License ISC

svg arrow

Package Exports

  • svg-arrow

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (svg-arrow) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

SVG Arrow

Interactive svg arrow. React component.

OnLine Example: http://frontend.workshop.red/svg-arrow

Install:

npm i svg-arrow

Use:

render() {
  return (
    <svg width={500} height={500}>
      <SvgArrow from={[50, 50]} to={[100, 100]} />
    </svg>
  );
}

Props:

from: from position;

to: to position;

onChange: callback when dragging;

color: triangle color, default '#ff0000';

stroke: stroke color, default '#000';

strokeWidth: stroke width, default 1;

fromDraggable: from position draggable, default true;

toDraggable: to position draggable, default true;