People Picker

Documentation

Input Parameters

Name Type Description
className string The class name to apply to the main element.
el HTMLElement The element to render the people picker to.
allowMultiple boolean Flag to allow multiple personas.
allowGroups boolean Flag to allow groups.
description string The people picker description.
label string The people picker label.
required boolean Required flag.
value Array<Types.SP.IPeoplePickerUser> The people picker value.

People Picker Interface

Name Type/Description
get() Returns the fabric component.
getValue() Returns the link value.

Fabric People Picker Interface

Name Type/Description
_container HTMLDivElement
_contextualHostView IContextualHost
_isContextualMenuOpen boolean
_peoplePickerMenu HTMLDivElement
_peoplePickerSearch HTMLInputElement
_peoplePickerSearchBox HTMLDivElement
_peoplePickerResults Array<HTMLDivElement>
_selectedCount HTMLDivElement
_selectedPeople HTMLDivElement
_selectedPlural HTMLDivElement
_selectResult(ev: _Event) Selects the result.

JavaScript

var $REST = require("gd-sprest-js");

// Create the people picker
var el = document.querySelector("#picker");
$REST.JS.Fabric.PeoplePicker({
    allowGroups: false,
    el: el,
    label: "My People Picker:"
});

TypeScript

import { Fabric } from "gd-sprest-js";

// Create the people picker
let el = document.querySelector("#picker");
Fabric.PeoplePicker({
    allowGroups: false,
    el,
    label: "My People Picker:"
});