• Home
  • Getting started
  • Foundation
  • Components
    • Accordion
    • Avatar
    • Badge
    • Bet Button
    • Bet Prediction
    • Bottom Sheet
      Deprecated
    • Button
    • Callout
    • Card
    • Carousel
    • Checkbox
    • Composable Modal
    • Date Picker
    • Dialog
    • Drawer
    • Floating Action Bar
    • Input
    • Notice
    • Pagination
    • Popover
    • Price label
    • Radio group
    • Select
    • Separator
    • Slider
    • Snackbar
    • Switch
    • Table
    • Tabs
    • Tabs Menu
    • Toggle Group
    • Tooltip
  • Patterns
  • Writing (SE)
  • Guidelines
  • Brand portal

Search the design system

Components

Avatar

View as markdown (opens in a new tab)

Avatar visually represents a user or entity, typically using an image, initials, or a placeholder. Indicators, such as badges or status icons, are placed with an outline to create contrast and ensure clear distinction between the Avatar and the associated information.

Avatar

Usage

The Avatar is used to visually represent users or entities in a compact and recognizable way. It is commonly applied in scenarios such as

  • User Profiles : Displaying a user’s photo, initials, or a placeholder when no image is available.
  • Collaboration Tools : Identifying team members, contributors, or participants in a group setting.
  • Status Indicators : Highlighting real-time information, such as online/offline status

Avatar types

The Avatar component is available in three distinct variations: Text , Image , and Signed out . Each variation suits a different user state.

Text

Avatar types – 1

When an Avatar is assigned to a user, it defaults to displaying the first letter of the user's name as the primary visual element. This ensures a clear and meaningful representation of the user, even in the absence of a custom image or icon.

Image

Avatar types – 2

When an image is provided for an Avatar, it takes precedence and replaces the default first-letter representation. The image is displayed as the primary visual element, offering a more personalized and identifiable representation of the user.

Signed out

Signed out

The Signed Out Avatar is displayed when no user is logged in. It serves as a placeholder to indicate the absence of an active user, ensuring a consistent visual experience even in an unauthenticated state.

Avatar sizes

Avatar is available in seven sizes to suit various contexts and layouts:

Avatar sizes

16 px – XXS

24 px – XS

32 px – S

40 px –M

48 px – L

56 px – XL

64 px – XXL

Anatomy

Text

Text
  1. Container
  2. Text

Image

Image – 1
  1. Container
  2. Image

Signed Out

Signed Out
  1. Container
  2. Icon

Behaviour

The Avatar component dynamically adapts its appearance based on the user's state and the provided data.

Placement

Place Avatar consistently within layouts and adjacent to the content it identifies.

Avatar with Badges

The Avatar component can be enhanced with badges to provide additional context or status information about the user or entity it represents. Badges are typically displayed as a small, circular indicator overlaid on the Avatar in the top right corner.

Avatar with Badges

The badges are available in three distinct colours, each representing a specific purpose:

  • Important (Red) : Used to highlight critical or urgent information that requires immediate attention.
  • Attention (Yellow/Orange) : Indicates a warning or a situation that needs acknowledgment but is less urgent than "Important."
  • Success (Green) : Represents positive or confirmed statuses, such as "online" or "completed."
  • Neutral represent a less important status or add on.

Examples

Signed-out

Examples

Signed-out avatar used to indicate a sign in call to action.

Text

Text – 1

The "Signed-in Avatar" represents a logged-in user. By default, the Avatar displays the first letter of the user's name.

Image

Signed-in avatar with image

If the user has actively changed the Avatar to an image, the image will be shown instead.

Best practices

Best practices – 1
Use the text or Image Avatar to represent a signed-in user.
Best practices – 2
Don’t use the signed-out Avatar to represent signed-in users.
Best practices – 1
If the number exceeds a single digit, write it as '9+' (e.g., 9+) to indicate more.
Best practices – 2
Don't use both icon and text in a badge — it adds clutter and disrupts its shape. Avoid full multi-digit numbers; use '9+' for clarity.

Content

Badges with text should be short and descriptive. Aim for one or two words that describe a state. Don’t try to include too much.

ComponentsAccordion / Changelog
ComponentsAvatar / Code

© DesignTech - AB Svenska Spel

What's newTerms of useAccessibility statementCookiesTeams channel [Internal]@svenskaspel/ui version
4.4.0

Feedback

We always want to improve the Design System and would be thrilled to get your feedback.

Please share your wisdom with us.

Microsoft Teams [internal]

Designsystem@svenskaspel.se