New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-curved-arrow

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-curved-arrow

Curvy arrows for your React project!

  • 0.1.0
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

enter image description here Fancy curved arrows for your React project! Great for tutorials and product tours!

https://react-curved-arrow.nickjanssen.com/

Installation

yarn add react-curved-arrow

Usage

import CurvedArrow from "react-curved-arrow";

// Usage
<CurvedArrow />

Props

NameTypeDescriptionDefault
fromSelectorDOM selectorDOM element from which your arrow will start.body
fromOffsetXnumberAmount of pixels to offset the arrow from the DOM element on the X axis.0
fromOffsetYnumberAmount of pixels to offset the arrow from the DOM element on the Y axis.0
toSelectorDOM selectorDOM element to which your arrow will go to.(same as fromSelector)
toOffsetXnumberAmount of pixels to offset the arrow from the DOM element on the X axis.0
toOffsetYnumberAmount of pixels to offset the arrow from the DOM element on the Y axis.0
middleXnumberMiddle point X position.0
middleYnumberMiddle point Y position.0
widthnumberWidth of the arrow and arrowhead.8
colorcolorColor of the arrow and arrowhead."black"
hideIfFoundSelectorDOM selectorOptional. if the arrow can find this selector, it will hide itself. Useful for product tours when you only want to show an arrow whenever a user hasn't performed an action yet such as opening a menu.
debugLinebooleanShow debug dots and lines for fromOffset, toOffset and middle vectors.false
dynamicUpdatebooleanAutomatically adjust the arrow whenever the from/to DOM elements update. Useful for dynamic content such as sliding menus or content that is within a scrolling container.false
zIndexnumberAdjust the z-index for this arrow.0

Try it out!

Open in Playground

Open in CodeSandbox

Made with ❤️ by Nick Janssen

Also check out Styled Page, a tool that lets you visually build React apps & components!

License

MIT

FAQs

Package last updated on 28 Feb 2020

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