0.3.25 • Published 5 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
5 years ago
0.3.25
5 years ago
0.3.24
5 years ago
0.1.21
5 years ago
0.1.22
5 years ago
0.1.23
5 years ago
0.1.24
5 years ago
0.3.23
5 years ago
0.3.22
5 years ago
0.3.21
5 years ago
0.3.20
5 years ago
0.1.20
5 years ago
0.3.19
5 years ago
0.1.19
5 years ago
0.3.18
5 years ago
0.1.18
5 years ago
0.3.16
7 years ago
0.1.15
7 years ago
0.3.15
7 years ago
0.1.14
7 years ago
0.3.14
7 years ago
0.1.13
7 years ago
0.3.13
7 years ago
0.1.12
7 years ago
0.3.12
7 years ago
0.1.11
7 years ago
0.3.11
7 years ago
0.1.10
7 years ago
0.1.9
7 years ago
0.3.10
7 years ago
0.1.8
7 years ago
0.3.9
7 years ago
0.1.7
7 years ago
0.3.8
7 years ago
0.1.6
7 years ago
0.3.7
7 years ago
0.1.5
7 years ago
0.3.6
7 years ago
0.1.4
7 years ago
0.1.3
7 years ago
0.1.2
7 years ago
0.3.4
7 years ago