Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-lineto-yanxi

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-lineto-yanxi

Draw a line between two elements in React.

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

react-lineto

Draw a line between two elements in React.

Build Status

Getting Started

yarn install
yarn run demo

Browse to localhost:4567.

Components

LineTo

Draw line between two DOM elements.

Example
import LineTo from 'react-lineto';

function render() {
    return (
        <div>
            <div className="A">Element A</div>
            <div className="B">Element B</div>
            <LineTo from="A" to="B" />
        </div>
    );
}
Properties
NameTypeDescriptionExample Values
from*stringCSS class name of the first element
to*stringCSS class name of the second element
fromAnchorstringAnchor for starting point (Format: "x y")top right, bottom center, 100% 0
toAnchorstringAnchor for ending point (Format: "x y")top right, bottom center, 100% 0
delaynumberForce render after delay (ms)
classNamestringDesired CSS className for the rendered element
borderstringLine decoration (CSS border property syntax)1px solid #000
zIndexnumberZ-index offset

* Required

Line

Draw line using pixel coordinates (relative to viewport).

Example
import { Line } from 'react-lineto';

function render() {
    return (
        <Line x0={0} y0={0} x1={10} y1={10} />
    );
}
Properties
NameTypeDescriptionExample Values
x0*numberFirst X coordinate
y0*numberFirst Y coordinate
x1*numberSecond X coordinate
y1*numberSecond Y coordinate
classNamestringDesired CSS className for the rendered element
borderstringLine decoration (CSS border property syntax)1px solid #000
zIndexnumberZ-index offset

* Required

FAQs

Package last updated on 23 Apr 2018

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