Sanity Library Reference Docs
    Preparing search index...

    Interface BlockStyleProps

    Props for rendering a text block style.

    interface BlockStyleProps {
        block: PortableTextTextBlock;
        children: Element;
        focused: boolean;
        renderDefault: (props: BlockStyleProps) => Element;
        schemaType: BlockStyleDefinition;
        selected: boolean;
        title: string;
        value: string;
    }
    Index

    Properties

    The value of the block that is rendered style for.

    children: Element

    The block as rendered without this style.

    focused: boolean

    If the block currently has focus in the text editor.

    renderDefault: (props: BlockStyleProps) => Element

    The default rendering function for this style.

    The schema type for this style.

    selected: boolean

    If the block currently have a text selection.

    title: string

    The title of the style (e.g. 'Large Heading') for UI-representation.

    value: string

    The value of the style (e.g. 'h1') as it appears in the block's .style property value.