react-sp-people-picker
v2.0.4
Published
SharePoint People Picker built for React Projects
Downloads
75
Maintainers
Readme
react-sp-people-picker
SharePoint People Picker built for React Projects
Install
npm install --save react-sp-people-picker
Usage
import React, { Component } from 'react'
import SpPeoplePicker from 'react-sp-people-picker'
import 'react-sp-people-picker/dist/index.css'
class Example extends Component {
render() {
return <SpPeoplePicker onSelect={handleSelect} />
}
}
You can use the component within your function component as well. Add the following tag into your jsx file.
<SpPeoplePicker onSelect={handleSelect} />
Just implement handleSelect(user) method which gets the selected SP User object as parameter.
For detailed usage information please read this blog post.
License
MIT © itszerocode