FacePile shows a document's authors as a short row of overlapping faces. It is a named component defined in read.contract L99-L111. It exists so that a card can say "these people wrote this" in the width of a few avatars.
Used by
Parent | Where |
|---|---|
The footer of every query card, before the date | |
The last line of an embed card, before the author names; see embed and query blocks |
Through those it appears only on the document screen. List rows (DocItemRow) do not use it: they print the authors' names as text.
Props
Prop | Type | Effect |
|---|---|---|
| list of people | One avatar per person, in order. The data gives at most three |
| number | When above zero, "+N" follows the faces |
| string | For tests only |
Anatomy
A row, vertically centred.
Each face is an Avatar at size 20, wrapped in a circle with a 2 point solid border in -exact-secondary-background.
The first face sits flush; each later one has a left margin of minus 6 points, so it overlaps the previous face by 6 points (plus the border).
"+N" is text in -exact-caption1, -exact-secondary-label, 4 points after the last face.
With three authors and two more, the pile is about 60 points wide plus the "+2".
The border colour is the point of the design. Cards and embed cards are filled with -exact-secondary-background, so a ring in the same colour reads as a gap cut between the faces, in light and in dark, with no extra token. See Color and tokens and Light and dark.
Variants and states
Case | Result |
|---|---|
One author | A single avatar with its ring |
Two or three | Overlapping avatars |
More than three | Three avatars and "+N" |
An author with no image | The Avatar fallback: a green disc with a white initial |
No authors | The parents do not render the pile at all |
Accessibility
The row carries one label for the whole pile: the authors' names joined by commas, then "and N more" when there are more, for example "Alex Burdiyan, Eric Vicenti and 2 more". A name shared by two accounts is said once. VoiceOver reads the pile as one thing, not as three unnamed images. See Accessibility.
Rules for use
Use it where a document is shown as a card on the secondary background and width is short.
Do not use it on a different surface without changing the ring: on the plain page background the ring would show as a grey outline.
Do not use it where there is room for names. A row has that room, so it uses names. The embed card shows both: the pile, then the names.
It is not tappable. The whole card is the link, and it goes to the document, not to an author.
Why it looks this way
The comment in the source names the origin: "up to three overlapping author avatars and "+N" for the rest (RN DocumentCard's face pile)". It was carried over from the React Native app's document card when cards were added (see What changed from the React Native app and why). Faces serve Names, not identifiers: authorship is shown as people, never as keys. The 20 point size is the smallest avatar in the app, below the 28 used in rows and bylines, because the pile sits in a caption-sized footer line (inferred from the -exact-caption1 text beside it). DESIGN.md lists only the 28 and 56 point sizes; 20 is newer than that document.
User stories
This page helps deliver these stories. Each story lists this page in its Trace, so the link holds in both directions (traceability).
US-READ-08 See the documents under and inside a document: Overlapping author faces on cards and embeds
US-READ-09 See who wrote a document and visit their profile: Author faces on cards elsewhere on the page
US-APP-06 See people and spaces by name: Several authors as overlapping avatars
Related
Parent page: Read components. Siblings: CommentCount, which shares the card footer.
Patterns: Cards and panels. Sizes: Spacing, radii and sizes.
How it is built: Read: screens and components, Shared components and visual design.
Source: read.contract L99-L111.
Do you like what you are reading? Subscribe to receive updates.
Unsubscribe anytime