0.3.25 • Published 3 years ago
react-multi-email2 v0.3.25
react-multi-email
A simple react component to format multiple email as the user types.
- Simple code
- No dependency
- Small size
- Simple customization
Installation
npm install react-multi-email -S
Usage
import * as React from 'react';
import { ReactMultiEmail } from 'react-multi-email';
import 'react-multi-email/style.css';
class Basic extends React.Component {
state = {
emails: [],
};
render() {
const { emails } = this.state;
const myStyle = {};
return (
<>
<Segment>
<Form>
<Form.Field>
<label>Email</label>
<ReactMultiEmail
style={myStyle}
emails={emails}
onChange={_emails => {
this.setState({ emails: _emails });
}}
getLabel={(
email,
index,
removeEmail,
) => {
return (
<Label key={index}>
{email}
<Icon name="delete" onClick={() => removeEmail(index)} />
</Label>
);
}}
/>
</Form.Field>
<Form.Field>
<label>react-multi-email value</label>
{emails.join(', ') || 'empty'}
</Form.Field>
</Form>
</Segment>
</>
);
}
}
License
If you don't mind, don't forget to press "star" before leaving.
0.1.25
3 years ago
0.3.25
3 years ago
0.3.24
3 years ago
0.1.21
3 years ago
0.1.22
3 years ago
0.1.23
3 years ago
0.1.24
3 years ago
0.3.23
3 years ago
0.3.22
3 years ago
0.3.21
3 years ago
0.3.20
3 years ago
0.1.20
3 years ago
0.3.19
3 years ago
0.1.19
3 years ago
0.3.18
3 years ago
0.1.18
3 years ago
0.3.16
6 years ago
0.1.15
6 years ago
0.3.15
6 years ago
0.1.14
6 years ago
0.3.14
6 years ago
0.1.13
6 years ago
0.3.13
6 years ago
0.1.12
6 years ago
0.3.12
6 years ago
0.1.11
6 years ago
0.3.11
6 years ago
0.1.10
6 years ago
0.1.9
6 years ago
0.3.10
6 years ago
0.1.8
6 years ago
0.3.9
6 years ago
0.1.7
6 years ago
0.3.8
6 years ago
0.1.6
6 years ago
0.3.7
6 years ago
0.1.5
6 years ago
0.3.6
6 years ago
0.1.4
6 years ago
0.1.3
6 years ago
0.1.2
6 years ago
0.3.4
6 years ago