@rn-base/input-filter
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@rn-base/input-filter

react-native filter input

Installation

npm install @rn-base/input-filter

Usage

import { Box, Text } from '@rn-base/element';
import InputFilter, { InputFilterConstants } from '@rn-base/input-filter';

<Box flex={1} center middle>
  <InputFilter
    filters={[
      { text: 'abcbcc', type: InputFilterConstants.character },
      {
        text: '[^0-9]',
        type: InputFilterConstants.regex,
      },
    ]}
    style={{ width: 100, backgroundColor: 'red' }}
    onChangeText={value => setText(value)}
  />

  <Text size={20}>{text}</Text>
</Box>;

Props

  • filters: Array
    • text: regex or Array
    • type: view InputFilterConstants
    • inverted (suport IOS and InputFilterConstants.character)

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Package Sidebar

Install

npm i @rn-base/input-filter

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

47.1 kB

Total Files

21

Last publish

Collaborators

  • hungdv26