Name card

Username

Show username using username prop.

<>
	<NameCard  user={{username:"james"}} />
</>

Full name

Show full name using fullName prop.

<>
	<NameCard  user={{details:{fullName:"James Smith"}}} />
</>

Avatar size

You can change avatar size with avatarSize prop.

<>
	<NameCard  avatarSize={50} user={{details:{fullName:"James Smith"}}} />
</>

User E-mail

Show user e-mail using email prop.

<>
	<NameCard  user={{details:{fullName:"James Smith"},email:"[email protected]"}} />
</>

Single Line

Make the secondLine invisible with singleLine prop.

<>
	<NameCard  singleLine={true} user={{details:{fullName:"James Smith"},email:"[email protected]"}} />
</>

Second line

Show second line using secondLine prop.

<>
	<NameCard  secondLine="Intern" user={{details:{fullName:"James Smith"}}} />
</>

API

import Namecard from "erxes-ui/lib/components/namecard/Namecard";
  • required prop
NAMETYPEDEFAULTDESCRIPTION
username*stringDefines the username
fullNamestringDefine fullname object of user. If you have both "details" and "username", it will only show "details"
emailstringDefine email object of user
singleLinestringMake the second line invisible
secondLinestringDefine line below the username or full name. You can write anything in the second line
avatarSizenumber40Set avatar size to your name card

Was this page helpful?