Sanity Library Reference Docs
    Preparing search index...

    Interface BlockListItemProps

    Props for rendering a Portable Text block as a list item.

    interface BlockListItemProps {
        block: PortableTextTextBlock;
        children: Element;
        focused: boolean;
        level: number;
        renderDefault: (props: BlockListItemProps) => Element;
        schemaType: BlockListDefinition;
        selected: boolean;
        title: string;
        value: string;
    }
    Index

    Properties

    The block that is rendered as a list item.

    children: Element

    The block rendered without the list style.

    focused: boolean

    If the block currently is focused by the user.

    level: number

    The nesting level of this list item.

    renderDefault: (props: BlockListItemProps) => Element

    The default function for rendering this as a list item. Some list types are built in and will have a default rendering.

    The schema type for this list type. Icon can be found here.

    selected: boolean

    If the user currently has a text selection in this block.

    title: string

    The title of the list item type (e.g. 'Bullet list') for UI-representation.

    value: string

    The value of the list item type (e.g. 'bullet') as it appears in the block.listItem attribute.