Sanity Library Reference Docs
    Preparing search index...

    Interface BlockListDefinition

    Schema definition for a text block list style.

    {
    name: 'blockContent',
    title: 'Content',
    type: 'array',
    of: [
    {
    type: 'block',
    lists: [
    {title: 'Bullet', value: 'bullet'},
    {title: 'Number', value: 'number'},
    ]
    }
    ]
    }
    interface BlockListDefinition {
        component?: ComponentType<BlockListItemProps>;
    }
    Index

    Properties

    Properties

    component?: ComponentType<BlockListItemProps>

    Component for rendering a block as a list item

    See also BlockListItemProps

    • Try not to hard code CSS properties that could be derived from @sanity/ui. This will make sure your rendering looks good independent of the theme context it appears in.
    • Don't render arbitrary text nodes as this will confuse the editor with what is editable text and not. If you need arbitrary text, make sure to wrap them in in a container with contentEditable={false}.