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

  • 4.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.8K
increased by2.79%
Maintainers
1
Weekly downloads
 
Created
Source

React Edit Text

travis npm

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

Made with ❤️ by Brian Min

demo

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
namestringNoHTML input name attribute
classNamestringNoHTML class attribute
valuestringNoValue of the component
defaultValuestringNoDefault value of the component
placeholderstringNo''Placeholder value
onSavefunctionNoCallback function triggered when input is saved
onChangefunctionNoCallback function triggered when input is changed
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 26 Jul 2021

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