itemPadding([padding])

Class: List.

Description:

Gets or sets a padding for each item in the list. See example below.

Parameters:

Name Type Description

[padding]

number | string

Number for same padding on all sides, string to specify padding for each side "top right bottom left"

Returns:

Returns this component instance if at least one argument is provided, otherwise returns current padding.

Type: string | List

Examples:

list.itemPadding(3);                // defines same padding for top, right, bottom and left.
list.itemPadding("5 0 5 3");        // defines padding for each side separately, top=5, right=0, bottom=5 and left=3.
const padding = list.itemPadding(); // gets the padding object