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

@webiny/react-properties

Package Overview
Dependencies
Maintainers
1
Versions
314
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webiny/react-properties

Build pluggable data objects using React components.

  • 5.42.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
689
decreased by-25.03%
Maintainers
1
Weekly downloads
 
Created
Source

React Properties

code style: prettier PRs Welcome

A tiny React properties framework, to build dynamic data objects using React components, which can be customized after initial creation. The usage is very similar to how you write XML data structures, but in this case you're using actual React.

Basic Example

import React, { useCallback } from "react";
import { Properties, Property, toObject } from "@webiny/react-properties";

const View = () => {
  const onChange = useCallback(properties => {
    console.log(toObject(properties));
  }, []);

  return (
    <Properties onChange={onChange}>
      <Property name={"group"}>
        <Property name={"name"} value={"layout"} />
        <Property name={"label"} value={"Layout"} />
        <Property name={"toolbar"}>
          <Property name={"name"} value={"basic"} />
        </Property>
      </Property>
      <Property name={"group"}>
        <Property name={"name"} value={"heroes"} />
        <Property name={"label"} value={"Heroes"} />
        <Property name={"toolbar"}>
          <Property name={"name"} value={"heroes"} />
        </Property>
      </Property>
    </Properties>
  );
};

Output:

{
  "group": [
    {
      "name": "layout",
      "label": "Layout",
      "toolbar": {
        "name": "basic"
      }
    },
    {
      "name": "heroes",
      "label": "Heroes",
      "toolbar": {
        "name": "heroes"
      }
    }
  ]
}

For more examples, check out the test files.

FAQs

Package last updated on 20 Jan 2025

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