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

react.js-nested-tree

Package Overview
Dependencies
Maintainers
0
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react.js-nested-tree - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

2

package.json
{
"name": "react.js-nested-tree",
"version": "1.2.0",
"version": "1.2.1",
"main": "dist/cjs/index.js",

@@ -5,0 +5,0 @@ "description": "The react.js-nested-tree package is a versatile React component designed for creating nested, hierarchical tree structures. This package is especially useful for applications that require a visual representation of nested data, such as file explorers, category trees, or organizational charts.",

@@ -25,7 +25,24 @@ # react.js-nested-tree

## Usage
## Usage:
### Props
The `TreeProps` interface defines the properties for the `Tree` component. Below is a detailed description of each property.
| Property | Type | Description |
| ------------------ | ------------------------------- | ------------------------------------------------------------------------ |
| `treeData` | `Item[]` | An array of `Item` objects representing the data for the tree structure. |
| `treeClassName` | `string` | (Optional) A class name to apply to the tree container element. |
| `itemClassName` | `string` | (Optional) A class name to apply to each tree item. |
| `subTreeClassName` | `string` | (Optional) A class name to apply to each sub-tree container. |
| `ItemComponent` | `React.ComponentType<TreeItem>` | A React component to render each tree item. |
| `subTreeStyle` | `React.CSSProperties` | (Optional) Inline styles to apply to each sub-tree container. |
| `parentTreeStyle` | `React.CSSProperties` | (Optional) Inline styles to apply to the parent tree container. |
| `treeItemStyle` | `React.CSSProperties` | (Optional) Inline styles to apply to each tree item. |
### Example
- ./App.tsx
```tsx
```typescript
import "./App.css";

@@ -79,1 +96,2 @@ import { TreeItems } from "./TreeItems";

> [react-js-nested-tree-demo](https://codesandbox.io/p/devbox/react-js-nested-tree-demo-mrggtt)
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