An open API service indexing awesome lists of open source software.

https://github.com/fakhir-shad/react-character-counter

A React Wrapper Component to display character counts against Controlled input elements
https://github.com/fakhir-shad/react-character-counter

bootstrap bootstrap-character-counter component controlled-input react react-character-counter

Last synced: 10 months ago
JSON representation

A React Wrapper Component to display character counts against Controlled input elements

Awesome Lists containing this project

README

          

# react-character-counter

## Installation

### Package Manager

#### NPM

```
npm install react-character-counter --save
```

### Basic Usage

This Component only works for controlled inputs

```
import CharacterCounter from 'react-character-counter'

state = {
name: ''
}

```

#### Accepted Props are below

```
{
value: String, Required
maxLength: Number, Required
wrapperStyle: Object, Optional
characterCounterStyle: Object, Optional
overrideStyle: Boolean, Optional
}
```

#### Adding more styles can be done as

```

```

#### Overriding existing Styling and positioning all together can be done as

```

```

#### Default Styling is listed below

##### Wrapper Style

```
{
position: "relative"
}
```

##### Character Counter Style

```
{
position: "absolute",
fontSize: "12px",
fontWeight: "600"
}
```