All Projects → bymi15 → react-edit-text

bymi15 / react-edit-text

Licence: MIT license
Simple 'click to edit' editable text component for React

Programming Languages

javascript
184084 projects - #8 most used programming language
CSS
56736 projects
HTML
75241 projects

Projects that are alternatives of or similar to react-edit-text

classy
Super simple text classifier using Naive Bayes. Plug-and-play, no dependencies
Stars: ✭ 12 (-57.14%)
Mutual labels:  simple, text
react-click-to-edit
Make any text editable.
Stars: ✭ 16 (-42.86%)
Mutual labels:  simple, editable
Customizable-Crypto-Currency-Dashboard-with-Chart
📺 A Dashboard with the price movements of the selected Cryptocurrencies 💹
Stars: ✭ 79 (+182.14%)
Mutual labels:  simple, editable
Semantic-Segmentation-BiSeNet
Keras BiseNet architecture implementation
Stars: ✭ 55 (+96.43%)
Mutual labels:  simple
vue-scrollin
🎰 Scroll-in text component for Vue
Stars: ✭ 61 (+117.86%)
Mutual labels:  text
Examples Qt
Shows how to use Qt widgets only by programming code (c++17).
Stars: ✭ 38 (+35.71%)
Mutual labels:  textbox
fresh
Fresh is a free blog template for Jekyll
Stars: ✭ 48 (+71.43%)
Mutual labels:  simple
als typograf
Ruby client for ArtLebedevStudio.RemoteTypograf Web Service.
Stars: ✭ 15 (-46.43%)
Mutual labels:  text
Physics
experimenting with physics simulation
Stars: ✭ 53 (+89.29%)
Mutual labels:  simple
material-chip-view
Material Chip view. Can be used as tags for categories, contacts or creating text clouds
Stars: ✭ 1,300 (+4542.86%)
Mutual labels:  text
react-text-toxicity
Detect text toxicity in a simple way, using React. Based in a Keras model, loaded with Tensorflow.js.
Stars: ✭ 38 (+35.71%)
Mutual labels:  text
agile
🌌 Global State and Logic Library for JavaScript/Typescript applications
Stars: ✭ 90 (+221.43%)
Mutual labels:  simple
ansiart2utf8
Processes legacy BBS-style ANSI art (ACiDDraw, PabloDraw, etc.) to UTF-8. Escape codes and line endings are processed for terminal friendliness.
Stars: ✭ 32 (+14.29%)
Mutual labels:  text
DevFolio
A Modern Portfolio Template for Developers with easy setup process documented(with hosting).
Stars: ✭ 96 (+242.86%)
Mutual labels:  simple
MatrixLib
Lightweight header-only matrix library (C++) for numerical optimization and machine learning. Contact me if there is an exciting opportunity.
Stars: ✭ 35 (+25%)
Mutual labels:  simple
content inspector
Fast inspection of binary buffers to guess/determine the type of content
Stars: ✭ 28 (+0%)
Mutual labels:  text
antd-etable
Editable Table base on Ant Design
Stars: ✭ 43 (+53.57%)
Mutual labels:  editable
skeleton-loader
Loader module for webpack to execute your custom procedure. It works as your custom loader.
Stars: ✭ 19 (-32.14%)
Mutual labels:  edit
heredoc
Package heredoc provides the here-document with keeping indent.
Stars: ✭ 89 (+217.86%)
Mutual labels:  text
alfred-string-operations
Perform string operations to clipboard content
Stars: ✭ 70 (+150%)
Mutual labels:  text

React Edit Text

Quality Gate Status travis npm 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

Please visit https://brianmin.com/react-edit-text/ for a live demo and various examples.

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 from 'react';

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

export default function Example() {
  return (
    <div>
      <EditText showEditButton />
      <EditTextarea />
    </div>
  );
}

Props

Shared props

Prop Type Required Default Description
id string No HTML DOM id attribute
name string No HTML input name attribute
className string No HTML class attribute for the display component
inputClassName string No HTML class attribute for the input component
value string No Value of the component
defaultValue string No Default value of the component
placeholder string No '' Placeholder value
formatDisplayText function No (x) => x Callback function applied on the value to display the formatted value
onSave function No Callback function triggered when input is saved
onChange function No Callback function triggered when input is changed
onEditMode function No Callback function triggered when component is clicked
onBlur function No Callback function triggered when input is blurred
style object No Sets CSS style of input and view component
readonly bool No false Disables the input and only displays the view component

EditText props

Prop Type Required Default Description
type string No 'text' HTML DOM input text type
inline bool No false Sets inline display
showEditButton bool No false Displays an edit button that can be pressed to enable edit mode
editButtonContent node No editIcon Sets the content for the edit button. This can be any valid element
editButtonProps object No {} Sets the props passed to the edit button. This can be any valid DOM attribute

EditTextarea props

Prop Type Required Default Description
rows number No 3 Number of visible rows

Contributing

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

License

MIT © Brian Min

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].