Skip to content

Commit 2d38c03

Browse files
committed
docs(avatar): Updates design guidelines for accuracy.
1 parent 776eb34 commit 2d38c03

2 files changed

Lines changed: 75 additions & 13 deletions

File tree

packages/documentation-site/patternfly-docs/content/design-guidelines/components/avatar/avatar.md

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,48 @@ id: Avatar
33
section: components
44
---
55

6+
import '../components.css';
7+
8+
## Elements
9+
10+
<div class="ws-docs-content-img">
11+
![Basic and bordered avatar.](./img/avatar-elements.svg)
12+
</div>
13+
1. **Image/graphic:** Visual representation of the user. If there is no custom image for a user, the default graphic will be shown.
14+
1. **Border (optional):** Outline, to improve the visual prominence of an avatar in a UI element.
15+
616
## Usage
717

8-
There are four size variations available to use for different scenarios. The typical usage for an avatar is to represent the current user in the masthead. However, based on your product's use cases and needs, there is room for customization.
18+
An avatar is typically used to represent the current user in the masthead. However, based on your product's use cases and needs, there is room for customization, as outlined in the following [avatar variations](#variations) section.
19+
20+
## Variations
21+
22+
There are 4 size variations available to use for different scenarios:
23+
24+
1. Small (sm), 24px
925

26+
- Default size.
27+
- Used in accordions, data lists, and tables:
1028

11-
### Small (24 px)
12-
This size variation should be used in components such as accordions, data lists, tables, etc.
29+
<img src="./img/small-avatar-data list & accordion.png" alt="Image displaying small avatar usage in data list and accordion" width="802"/>
1330

14-
<img src="./img/small-avatar-data list & accordion.png" alt="Image displaying small avatar usage in data list and accordion" width="802"/>
31+
- Also used in the masthead component:
1532

16-
### Medium (36 px)
17-
This size variation is the default avatar size and should be used in the masthead component.
33+
<img src="./img/medium-avatar-masthead.png" alt="Image displaying medium avatar usage in masthead" width="1024"/> 
1834

19-
<img src="./img/medium-avatar-masthead.png" alt="Image displaying medium avatar usage in masthead" width="1024"/> 
35+
1. Medium (md), 36px
2036

21-
### Large (72 px)
22-
This size variation should be used in components such as cards.
37+
1. Large (lg), 72px
38+
39+
- Used in cards.
2340

24-
<img src="./img/large-avatar-card.png" alt="Image displaying large avatar usage in card" width="353"/> 
41+
<img src="./img/large-avatar-card.png" alt="Image displaying large avatar usage in card" width="353"/> 
2542

26-
### Extra Large (128 px)
27-
This size variation should be used in components such as profile displays.
43+
1. Extra large (xl), 128px
44+
45+
- Used in profile displays.
2846

29-
<img src="./img/extra-large-avatar-profile display.png" alt="Image displaying extra large avatar usage in profile display" width="1024"/>
47+
<img src="./img/extra-large-avatar-profile display.png" alt="Image displaying extra large avatar usage in profile display" width="1024"/>
3048

3149
## Accessibility
3250
For information regarding accessibility, visit the [avatar accessibility](/components/avatar/accessibility) tab.
Lines changed: 44 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)