New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-json-editor-tw

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-json-editor-tw

Beautiful and customizable JSON editor for React with Tailwind CSS design. Supports editable fields, theme customization, and modern UI for working with JSON data.

latest
npmnpm
Version
0.4.2
Version published
Maintainers
1
Created
Source

React JSON Editor (Tailwind)

Beautiful and customizable JSON editor for React with Tailwind CSS design, editable fields, and theme customization.
Supports editing, adding/removing fields, changing types (string, number, boolean, null, object, array) and nested structures.

🚀 Installation

npm install react-json-editor-tw

or

yarn add react-json-editor-tw

📦 Usage

import React, { useState } from "react";
import JsonEditor from "react-json-editor-tw";

export default function App() {
  const [data, setData] = useState({
    name: "John",
    age: 30,
    active: true,
    tags: ["react", "tailwind"],
    profile: { email: "test@example.com" }
  });

  return (
    <div className="p-4">
      <JsonEditor
        value={data}
        onChange={setData}
        defaultCollapsed={false}
      />
    </div>
  );
}

🎨 Features

  • 📂 Expandable/collapsible objects & arrays
  • 🖊 Editable fields (strings, numbers, booleans, nulls)
  • ➕ Add/remove keys & array items
  • 🔄 Change field type (string, number, boolean, null, object, array)
  • 🎨 Tailwind-based design with theme customization
  • ⚡ Lightweight, React-friendly component

⚙ Props

PropTypeDefaultDescription
valueanyJSON data to display
onChange(newVal: any) => voidCallback when value changes
defaultCollapsedbooleanfalseCollapse all by default
themeobjectbuilt-inCustomize colors, fonts, spacing
expandedPathsstring[]Force expand/collapse nodes
onDelete(key: string) => voidHandle deletion
onRename(oldKey: string, newKey: string)Handle rename of keys

🎨 Theme Example

const theme = {
  fontSize: 14,
    step: 8,
    fontFamily: "monospace",
    lineHeight: 1.4,
    colors: {
        key: "#61afef",
        string: "#a0d57a",
        number: "#e79b55",
        boolean: "#c678dd",
        null: "#c678dd",
        brackets: "#6c6c6c",
        colon: "#abb2bf",
        border: "#3e4451",
        type: "#6c6c6c",
        array: "#6c6c6c",
        object: "#6c6c6c",
        index: "#6c6c6c",
        pick: "#61afef",
    }
}

📜 License

MIT © 2025 [stalk94]

Keywords

json

FAQs

Package last updated on 23 Aug 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