enes

Persona

Documentation for the Persona component.

John Doe

Software Engineer

Intranet

Team A

Presence Only

Available

Alex Johnson

Available

Custom Size

Usage

<script>
	import { Persona } from 'fluentui-svelte';
</script>

<Persona
	name="John Doe"
	primaryText="Software Engineer"
	secondaryText="Intranet"
	tertiaryText="Team A"
	presence={{ status: 'available' }}
	avatar={{ color: 'colorful' }}
/>

Component API

Text Align

A Persona supports three text alignments, with 'left' as the default position.

Alex Johnson

Available

Alex Johnson

Available

Alex Johnson

Available

Text Position

A Persona supports four text positions: 'top', 'bottom', 'left', and 'right'. The default position is 'right'.

Alex Johnson

Available

Alex Johnson

Available

Alex Johnson

Available

Alex Johnson

Available

Size

A Persona supports custom sizes, with a default of 42px. You can set the size using the size prop. This applies to both the avatar or presence-only display and all text.

John Doe

John Doe

John Doe

Avatar

A Persona wraps an avatar inside it, which can be customized with all the props available to the Avatar component.

John Doe

John Doe

John Doe

Presence

A Persona can display presence information, such as online status or availability. This is controlled through the presence prop, which accepts an object with a status key.

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

John Doe

Component Props

NameTypeDescription
namestringThe full name of the person.
primaryTextstringMain text, usually the person's role or title.
secondaryTextstringSecondary text, for example location or status.
tertiaryTextstringTertiary text, for example team or department.
sizenumberSize in pixels for the avatar and text.
textAlignstringAlignment of the text. Possible values are 'left', 'center', and 'right'.
textPositionstringPosition of the text relative to the avatar. Possible values are 'top', 'bottom', 'left', and 'right'.
avatarAlignstringCross-axis alignment of the avatar relative to the text. Possible values are 'start', 'center', and 'end'.
avatarobjectAvatar props object. See the Avatar component for details.
presenceobjectPresence object, for example undefined. Status values are 'available', 'away', 'busy', 'do-not-disturb', 'offline', 'out-of-office', 'blocked', and 'unknown'.
presenceOnlybooleanShows only the presence indicator, with no avatar or text.
elementHTMLDivElementThe DOM reference of the persona root element.