2.28.0 • Published 10 months ago

@s-ui/react-molecule-input-tags v2.28.0

Weekly downloads
1,038
License
MIT
Repository
-
Last release
10 months ago

MoleculeInputTags

MoleculeInputTags is an AtomInput with the behavior of adding/removing AtomTag as a list

Installation

$ npm install @s-ui/react-molecule-input-tags --save

Usage

import MoleculeInputTags from '@s-ui/react-molecule-input-tags'
const closeIcon = () => <span>X</span>

Basic usage

<MoleculeInputTags tagsCloseIcon={closeIcon} />

Entering tags on Tab

<MoleculeInputTags tagsCloseIcon={closeIcon} onEnterKey="Tab" />

Initial list of tags

<MoleculeInputTags tagsCloseIcon={closeIcon} tags={['john','paul','george','ringo']} />

AtomInput props

All props of AtomInput can also be passed to MoleculeInputTags

<MoleculeInputTags tagsCloseIcon={closeIcon} errorState={true} />

Just unique values

You can set allowDuplicates to false to force unique values

<MoleculeInputTags allowDuplicates={false} />

Max tags

use maxTags prop to set a number of maximum tags that can be entered, after reaching that number the field gets disabled

<MoleculeInputTags maxTags={3} />

Find full description and more examples in the demo page.

2.28.0

10 months ago

2.27.0

1 year ago

2.26.0

1 year ago

2.25.0-beta.1

2 years ago

2.25.0-beta.0

2 years ago

2.25.0

2 years ago

2.24.0

2 years ago

2.23.0

2 years ago

2.22.0

2 years ago

2.21.0

2 years ago

2.20.0

3 years ago

2.19.0

3 years ago

2.18.0

3 years ago

2.17.0

3 years ago

2.16.0

3 years ago

2.15.0

3 years ago

2.14.0

3 years ago

2.13.0

3 years ago

2.12.0

3 years ago

2.11.0

4 years ago

2.10.0

4 years ago

2.9.0

4 years ago

2.8.0

4 years ago

2.7.0

5 years ago

2.6.0

5 years ago

2.5.0

5 years ago

2.4.0

5 years ago

2.3.0

5 years ago

2.2.0

5 years ago

2.1.0

5 years ago

2.0.0

5 years ago

1.2.0

5 years ago

1.1.0

6 years ago