Skip to content
Razor catalogue

On this page

@addTagHelper *, Webority.Ui.Razor

In a table

Use the person cell in any row that names who a record is about, so each person looks the same everywhere.

A team table
you tags the signed-in person; href turns the name into a link.
PersonRole
Asha RaoYouasha@example.com
Lead
Approver
Meera Iyer
Viewer
Show code
<app-person name="Asha Rao" secondary="asha@example.com" you="true" />
<app-person name="Vikram Singh" secondary="Finance" href="/people/vikram" />
<app-person name="Meera Iyer" size="Sm" />

Sizes and tones

Use size sm in dense tables; tone tints the initials, and auto gives each name its own colour.

Avatar sizes and tints
Asha RaoDesign
size=md (default)
Asha RaoDesign
size=sm
Ravi Kumar
tone=success
Meera Iyer
tone=danger
Arjun Mehta
tone=auto
Show code
<app-person name="Asha Rao" secondary="Design" />
<app-person name="Asha Rao" secondary="Design" size="Sm" />
<app-person name="Ravi Kumar" tone="Success" />
<app-person name="Meera Iyer" tone="Danger" />
<app-person name="Arjun Mehta" tone="Auto" />

Every option

Every value of every prop, one cell each.

name: any text

name="Vikram Singh"
Vikram Singh

secondary: any text

secondary="Finance"
Asha RaoFinance

src: photo or initials

src="/samples/sections/avatar-arjun.svg"
Arjun Mehta
Arjun Mehta
src not set (default): initials
Asha RaoDesign

href: any URL

href="#"

size: both values

size="md" (default)
Asha RaoDesign
size="sm"
Asha RaoDesign

you: both values

you="false" (default)
Asha RaoDesign
you="true"
Asha RaoYouDesign

tone: all seven

tone="primary" (default)
Asha Rao
tone="neutral"
Priya Nair
tone="success"
Ravi Kumar
tone="warning"
Kiran Das
tone="danger"
Meera Iyer
tone="info"
Sanjay Patel
tone="auto"
Arjun Mehta

Reference

Try every prop, read the full list, and check keyboard and screen reader behaviour.

sm md
primary neutral success warning danger info auto
Asha Raoasha@example.com
Razor, the same props
<app-person name="Asha Rao" secondary="asha@example.com" />

7 props.

Less common 7 props

PropTypeDefaultDescription
namedefault - string - The person's name. Required; an empty name throws.
secondarydefault - string - The line under the name, such as an email or a role.
srcdefault - string - Photo URL. Without one the avatar shows initials.
hrefdefault - string - Makes the name a link to this URL.
sizedefault md sm | md md The avatar scale. Any other value throws.
youdefault false bool false Shows a "You" tag beside the name, for the signed-in person.
tonedefault primary primary | neutral | success | warning | danger | info | auto primary The avatar tint for initials.