Spectrum Components API

Schema version: 6.0.0

Avatar

An avatar is a thumbnail representation of an entity, such as a user or an organization.

PropertyValuesDefault valueRequired
size
yes / no
nono
image
user image / gradient image / gradient / guest image / initials
user image
is disabled
yes / no
no
show stroke
yes / no
no
state
default / down / keyboard focus
default
{
  "slug": "avatar",
  "$schema": "https://opensource.adobe.com/spectrum-design-data/schemas/component.json",
  "$id": "https://opensource.adobe.com/spectrum-design-data/schemas/components/avatar.json",
  "title": "Avatar",
  "description": "An avatar is a thumbnail representation of an entity, such as a user or an organization.",
  "meta": {
    "category": "navigation",
    "documentationUrl": "https://spectrum.adobe.com/page/avatar/"
  },
  "type": "object",
  "properties": {
    "size": {
      "type": "number",
      "enum": [
        50,
        75,
        100,
        200,
        300,
        400,
        500,
        600,
        700,
        800,
        900,
        1000,
        1100,
        1200,
        1300,
        1400,
        1500
      ],
      "default": 500
    },
    "image": {
      "type": "string",
      "enum": [
        "user image",
        "gradient image",
        "gradient",
        "guest image",
        "initials"
      ],
      "default": "user image"
    },
    "isDisabled": {
      "type": "boolean",
      "default": false
    },
    "showStroke": {
      "type": "boolean",
      "default": false
    },
    "state": {
      "type": "string",
      "enum": [
        "default",
        "down",
        "keyboard focus"
      ],
      "default": "default"
    }
  }
}
← Back to home