Interface Shadow

Represents shadow properties in Penpot. This interface includes properties for defining drop shadows and inner shadows, along with their visual attributes.

interface Shadow {
    id?: string;
    style?: "drop-shadow" | "inner-shadow";
    offsetX?: number;
    offsetY?: number;
    blur?: number;
    spread?: number;
    hidden?: boolean;
    color?: Color;
}

Properties

id?: string

The optional unique identifier for the shadow.

style?: "drop-shadow" | "inner-shadow"

The optional style of the shadow.

  • 'drop-shadow': A shadow cast outside the element.
  • 'inner-shadow': A shadow cast inside the element.
offsetX?: number

The optional X-axis offset of the shadow.

offsetY?: number

The optional Y-axis offset of the shadow.

blur?: number

The optional blur radius of the shadow.

spread?: number

The optional spread radius of the shadow.

hidden?: boolean

Specifies whether the shadow is hidden. Defaults to false if omitted.

color?: Color

The optional color of the shadow, defined by a Color object.