Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-edit-text

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-edit-text

Simple editable text component for React

  • 2.1.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
decreased by-9.76%
Maintainers
1
Weekly downloads
 
Created
Source

React Edit Text

travis npm

This is an editable text component for React. Simply click on the text to edit!

Made with ❤️ by Brian Min

Demo

Feel free to check out the live demo

Install

npm install react-edit-text --save

Type definitions

npm install @types/react-edit-text --save-dev

Usage

Make sure to import the CSS stylesheet before using the component.

import React, { Component } from 'react';

import { EditText, EditTextarea } from 'react-edit-text';
import 'react-edit-text/dist/index.css';

class Example extends Component {
  render() {
    return (
      <div>
        <EditText />
        <EditTextarea />
      </div>
    );
  }
}

Props

Shared props

PropTypeRequiredDefaultDescription
idstringNoHTML DOM id attribute
namestringNo''HTML input name attribute
classNamestringNoHTML class attribute
valuestringNo''Value of the input and view content
placeholderstringNo''Placeholder value
onSavefunctionNoCallback function triggered when input is saved
styleobjectNoSets CSS style of input and view component
readonlyboolNofalseDisables the input and only displays the view component

EditText props

PropTypeRequiredDefaultDescription
typestringNo'text'HTML DOM input text type
inlineboolNofalseSets inline display

EditTextarea props

PropTypeRequiredDefaultDescription
rowsnumberNo3Number of visible rows

Contributing

Contributions are very much appreciated and welcome. Please refer to the contributing guidelines for more details.

License

MIT © Brian Min

Keywords

FAQs

Package last updated on 16 Nov 2020

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