Represents a media-type background.

A media-type background is a background that is either an image or a video.

0.4.0

interface BackgroundMedia {
    alignment: Alignment;
    blur: number;
    brightness: number;
    contrast: number;
    enabled: boolean;
    fit: MediaFit;
    hue: number;
    offset: {
        x: number;
        y: number;
    };
    opacity: number;
    rotate: number;
    saturation: number;
    scale: number;
    source: string;
    type: "Video" | "Image";
    customCss?: string;
}

Hierarchy (view full)

Properties

alignment: Alignment

The alignment of the media within the background.

Center

0.5.0 • Added diagonal alignments

blur: number

The amount of blur (in pixel) to apply to the background media.

0
brightness: number

The brightness of the background media.

The value is a number between -100 and 100.

0.5.0

contrast: number

The contrast of the background media.

The value is a number between -100 and 100.

0.5.0

enabled: boolean

Whether the background is enabled.

The fit of the media within the background.

None - The media will not be resized or cropped.

Fill - The media will stretch to fill the background.

Contain - The media will be contained within the background.

Cover - The media will cover the background.

ScaleDown - The media will be displayed in its original size unless it is larger than the background.

None
hue: number

The hue of the background media.

The value is a number between 0 and 360.

0.5.0

offset: {
    x: number;
    y: number;
}

The offset of the background media.

The offset is a pair of numbers that represent the x and y offset of the media.

0.5.0

opacity: number

The opacity of the background media

The value is a number between 0 and 1.

1
rotate: number

The rotation of the background media.

0.5.0

saturation: number

The saturation of the background media.

The value is a number between -100 and 100.

0.5.0

scale: number

The scale of the background media.

0.5.0

source: string

The source of the background media.

type: "Video" | "Image"

The type of the background.

customCss?: string

Custom CSS for the background media.