Title: People Cloud Component Added: v3.0.0 Status: Experimental

Last reviewed: 2019-03-20

Allows one or more users to be selected (with auto-suggestion) based on the input parameters.

Basic Usage


Class members


NameTypeDefault valueDescription
appNamestringName of the application. If specified, this shows the users who have access to the app.
excludedUsersIdentityUserModel[][]Array of users to be excluded. Mandatory properties are: id, email, username
groupsRestrictionstring[][]Array of groups to restrict user searches. Mandatory property is group name
modeComponentSelectionMode"single"User selection mode (single/multiple).
preSelectUsersIdentityUserModel[][]Array of users to be pre-selected. All users in the array are pre-selected in multi selection mode, but only the first user is pre-selected in single selection mode. Mandatory properties are: id, email, username
readOnlybooleanfalseShow the info in readonly mode
requiredbooleanfalseMark this field as required
rolesstring[]Role names of the users to be listed.
searchUserCtrlFormControl<any>FormControl to search the user
titlestringPlaceholder translation key
userChipsCtrlUntypedFormControlFormControl to list of users
validatebooleanfalseThis flag enables the validation on the preSelectUsers passed as input. In case the flag is true the components call the identity service to verify the validity of the information passed as input. Otherwise, no check will be done.


changedUsersEventEmitter<IdentityUserModel[]>Emitted when a user selection change.
removeUserEventEmitter<IdentityUserModel>Emitted when a selected user is removed in multi selection mode.
selectUserEventEmitter<IdentityUserModel>Emitted when a user is selected.
warningEventEmitter<any>Emitted when an warning occurs.



You can use readonly property to set the component in readonly mode. Readonly mode will disable any interaction with the component.


If you want to manage each user seperately you can set their readonly property at your preference. You need to have component's readonly property set to false. Component's readonly mode overwrites users level.

const preSelectUsers = [
        { "id": "1", "username": "username1", "firstName": "user 1", "readonly": true },
        { "id": "2", "username": "username2", "firstName": "user 2", "readonly": false },
        { "id": "3", "username": "username3", "firstName": "user 3", "readonly": true }

from above preSelectUsers, username2 is removable from the preSelectUsers whereas username1, username3 are readonly you can not remove them.

© 2023 Alfresco Software, Inc. All Rights Reserved.