Socket
Socket
Sign inDemoInstall

figma-tree

Package Overview
Dependencies
18
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    figma-tree

A React tree component that looks similar to Figma tree, a tree ui component that has all the tree functionalities


Version published
Weekly downloads
21
increased by61.54%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Tree

npm npm Donate npm bundle size

A React tree component that looks similar to Figma tree, a tree ui component that has all the tree functionalities

Document

https://noxxxxxxxx.github.io/tree/

How to use

In an ideal scenario, we only store the necessary data in the database. When retrieving data to construct a tree, we may need to extend some attributes in the tree nodes to align with our custom logic. So we need an API fieldNames to tell the component which nodes can be inserted into other nodes.

Confirm whether the attributes are consistent. If they are not consistent, use fieldNames to set them.

import Tree from 'figma-tree'
import 'figma-tree/dist/style.css'

export default App () => {
  const data= []
  const config = {}

  return (
    return (
    <Tree
      {...config}
      data={data}
    />
  )
  )
}

Feature

  • copy node
  • paste node
  • cut node
  • fold node
  • hidden node
  • lock node
  • move node
  • remove node
  • select single node
  • select multi nodes
  • context menu
  • change selected color
  • node icon
  • custom indent size
  • draggable
  • theme option

Develop

Feel free to fork or clone this repository.

pnpm i

npm run dev

LICENSE

This repository is published under MIT license

Keywords

FAQs

Last updated on 15 Sep 2023

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc