pierpo/react-archer
์๊ฐ
๐น React ์์ ์ฌ์ด์ ํ์ดํ ๊ทธ๋ฆฌ๊ธฐ ๐
์น ๋ฐ ์ฑ ๊ฐ๋ฐ์ธก์ ๋ ์คํ ์ฆ๊ฐ
- in 24h
- 0
- in 7 days
- +1
- in 15 days
- +2
- in 1 month
- +3
์๋ก ๊ฒน์น๋ ๊ธฐ๊ฐ์ ์์ฆ๊ฐ๋์ด๋ฉฐ ์ผ๋ณ ํฉ๊ณ๊ฐ ์๋๋๋ค. ์ธก์ ๊ฐ์ด ์์ผ๋ฉด ๋น์ ๋ก๋๋ค. ์คํ๋ ๊ด์ฌ๋๋ฅผ ๋ํ๋ด๋ฉฐ ํ์ง์ ๋ณด์ฅํ์ง ์์ต๋๋ค.
README.md
Originalreact-archer
๐น Draw arrows between DOM elements in React ๐
๐ Documentation & live examples โ
Installation
npm install react-archer --save or yarn add react-archer
Example
import { ArcherContainer, ArcherElement } from 'react-archer';
const boxStyle = { padding: '10px', border: '1px solid black' };
const App = () => (
<ArcherContainer strokeColor="#6366f1">
<ArcherElement
id="root"
relations={[
{
targetId: 'element2',
sourceAnchor: 'bottom',
targetAnchor: 'top',
style: { strokeDasharray: '5,5' },
// ...other relation options
},
]}
>
<div style={boxStyle}>Root</div>
</ArcherElement>
{/* ...layout omitted... */}
<ArcherElement id="element2" relations={[{ targetId: 'element3', label: 'Arrow 2' }]}>
<div style={boxStyle}>Element 2</div>
</ArcherElement>
<ArcherElement id="element3">
<div style={boxStyle}>Element 3</div>
</ArcherElement>
<ArcherElement id="element4" relations={[{ targetId: 'root', label: 'Arrow 3' }]}>
<div style={boxStyle}>Element 4</div>
</ArcherElement>
</ArcherContainer>
);
export default App;
Documentation
Full documentation lives on the website:
- Getting started
- Examples โ live, interactive
- API reference
- Troubleshooting
Contributing
The library lives in src/. The example/ app is a Vite playground used for
local development and end-to-end tests:
yarn install
yarn start # run the example app at http://localhost:8080
yarn test # format, lint, typecheck and unit tests
yarn test:e2e # Cypress end-to-end tests
Commit & PR conventions
PR titles must follow Conventional Commits
(e.g. feat: ..., fix: ..., chore: ..., docs: ...). PRs are squash-merged
using their title, so this title becomes the commit on master and feeds the
changelog. A CI check validates the PR title.
๊ด๋ จ ํ๋ก์ ํธ ์ดํด๋ณด๊ธฐ
๋ถ๋ฌ์ค๋ ์คโฆ
