Socket
Socket
Sign inDemoInstall

searchable-react-json-view

Package Overview
Dependencies
30
Maintainers
4
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    searchable-react-json-view

Interactive react component for displaying javascript arrays and JSON objects.


Version published
Weekly downloads
1.5K
increased by0.6%
Maintainers
4
Created
Weekly downloads
 

Readme

Source

searchable-react-json-view

This is a fork of react-json-view with an extra search capability.
Please go there for the full readme.

Install

yarn add searchable-react-json-view

New Props

NameTypeDefaultDescription
highlightSearchstringNoneWhat term to highlight - applies to number, string, boolean and object keys.
highlightSearchColorstringHighlight color
highlightCurrentSearchColorstringCurrent highlight color
customCopiedIconJSX.ElementnullCustom icon that appears after copying
customCopyIconJSX.ElementnullCustom icon for copy to clipboard
customActionsarray[]Custom actions that appear after copy, edit etc. each item should be: { icon: JSX.Element, onClick: clickedJsonValue => void }

Example

Custom actions & copy icon

<JsonViewer
    customCopiedIcon={<span>Copied</span>}
    customCopyIcon={<span>Copy</span>}
    customActions={[{
        icon: <span>A</span>,
        onClick: (value) => alert(JSON.stringify(value))
    }]}
/>

Keywords

FAQs

Last updated on 20 Jul 2021

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