Interface ToolkitPortableTextDirectList

Toolkit-specific type representing a nested list in "direct" mode, where deeper lists are nested inside of the lists children, alongside other blocks.

interface ToolkitPortableTextDirectList {
    _type: "@list";
    _key: string;
    mode: "direct";
    level: number;
    listItem: string;
    children: (ToolkitPortableTextDirectList | PortableTextListItemBlock<PortableTextMarkDefinition, PortableTextSpan, string, string>)[];
}

Properties

_type: "@list"

Type name, prefixed with @ to signal that this is a toolkit-specific node.

_key: string

Unique key for this list (within its parent)

mode: "direct"

List mode, signaling that list nodes can appear as direct children

level: number

Level/depth of this list node (starts at 1)

listItem: string

Style of this list item (bullet, number are common values, but can be customized)

children: (ToolkitPortableTextDirectList | PortableTextListItemBlock<PortableTextMarkDefinition, PortableTextSpan, string, string>)[]

Child nodes of this list - either portable text list items, or another, deeper list