HeaderBackground

The HeaderBackground is a component that includes the necessary functionality to change the image of the community header.

Interface

interface IHeaderBackground extends IElement {
  imageUrl: string;
  isOwner: boolean;
  siteType: "Community" | "Person";
}

Example

HeaderBackground
{
  "type": "HeaderBackground",
  "imageUrl": "@eval({fields.togoBackgroundImageUrl} || \"https://spoprod-a.akamaihd.net/default.jpg\")",
  "isVisible": "{isVisible}",
  "isOwner": "{base.isOwner}",
  "horizontalSeparator": false,
  "imageBackgroundResolution": 4,
  "style": {
    "height": "@eval(window.innerWidth > 540 ? \"376px\" : \"160px\")",
    "borderTopLeftRadius": "8px",
    "borderTopRightRadius": "8px"
  }
}

Properties

type

Must be “HeaderBackground”.

  • Type: "HeaderBackground"

  • Required: Yes

imageUrl

Url of the image to show

  • Type: string

  • Required: Yes

isOwner

It is necessary to know if the user has permission to modify the image.

  • Type: boolean

  • Required: Yes

siteType

Indicates if the header is from a community or a person.

  • Type: "Community" | "Person"

  • Required: Yes