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

https://github.com/hirishu10/react-native-customized-box

React Native Customized Input Box is very simple and easy to use.
https://github.com/hirishu10/react-native-customized-box

box-style custom-inputbox hirishu10 inputbox npm password-toggle-box react react-native react-native-inputbox required-box

Last synced: 4 months ago
JSON representation

React Native Customized Input Box is very simple and easy to use.

Awesome Lists containing this project

README

        

# react-native-customized-box ยท ![Version](https://img.shields.io/npm/v/react-native-customized-box?label=version) ![License](https://img.shields.io/npm/l/react-native-customized-box) ![Downloads](https://img.shields.io/npm/dw/react-native-customized-box) ![DocsPassing](https://img.shields.io/badge/Github-hirishu10-lightgrey)

React Native Customized Box is very simple and easy to use.

# Content

- [Getting started](#getting-started)
- [Overview](#overview)
- [Method and Props Configuration](#method-and-props-configuration)
- [Author](#author)
- [License](#license)

# Getting started

## Prerequisites

- Node (version 12 or greater).
- Yarn (version 1.5 or greater).
- React, React-Native should be installed
- A fork of the repo (for any contributions).

## Installation

> Using NPM

```bash
npm i --save react-native-customized-box
```

> Using Yarn

```bash
yarn add react-native-customized-box
```

# Overview

#### ๐Ÿ“– Below we provide examples with code how to use!

```jsx
import CustomBox from "react-native-customized-box";
```

#### โ–บ Example - 1

> โ†’ Box fully customizable

| | |
| :-----------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| | |

> **Code Snippet โ†“**

```jsx


```

#### โ–บ Example - 2

> โ†’ Toggle feature enabled

| | |
| :-----------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| | |

> **Code Snippet โ†“**

```jsx


```

#### โ–บ Example - 3

> โ†’ Box color change while focusing

| | |
| :-----------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| | |

> **Code Snippet โ†“**

```jsx


```

#### โ–บ Example - 4

> โ†’ Label and Required option enable to give error on condition

| | |
| :-----------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------: |
| | |

> **Code Snippet โ†“**

```jsx

*Add Custom Message and decoreate your own,
style: { textAlign: "center", textDecorationLine: "underline" },
}}
/>
```

# Method and Props Configuration

๐Ÿ”ง Below are the method which you can use to customized the Box in your style

| Method | Type | Description |
| :--------------- | :------: | :------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `width` | Number | This is not \*Mandatory By `default` set to `300` but you can change and add your own |
| `height` | Number | This is not \*Mandatory By `default` set to `50` but you can change and add your own |
| `placeholder` | String | Provide text for the Placeholder |
| `toggle` | Boolean | Provide `True` to display `SHOW/HIDE` by **default** set to `False` |
| `boxColor` | String | Provide Color for the _`InputBox`_ by `default` color set to `silver` |
| `focusColor` | String | Provide Color for change the box color while focusing the _`InputBox`_ |
| `boxStyle` | Object | Provide custom `style`/decoration for the _`InputBox`_ |
| `inputStyle` | Object | Provide custom `style`/decoration for the Text inside the _`InputBox`_ |
| `labelConfig` | Object | **`text:`** Provide text for the Label (String) **`style:`** Provide custom style for the Label (Object) |
| `requiredConfig` | Object | **`text:`** Provide custom mandatory message to display like(\*This is Required) you can add your own (String) **`style:`** Provide custom style for the required text (Object) |
| `values` | String | You can use this to set predefine values or get the current _`InputBox`_ value |
| `onChangeText` | Function | Function like `onChangeText` |

# Author

#### Thank You All ๐Ÿ™๐Ÿป

Made with ๐Ÿ–ค by

**Author** : [Rishu Chowdhary](https://github.com/hirishu10)

**Email** : [email protected]

# License

#### MIT License ๐Ÿ“„

This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/hirishu10/react-native-customized-box/blob/main/LICENSE) file for details