Sanity Library Reference Docs
    Preparing search index...

    Interface UseStateLinkOptions

    interface UseStateLinkOptions {
        onClick?: MouseEventHandler<HTMLElement>;
        replace?: boolean;
        state?: Record<string, unknown>;
        target?: string;
        toIndex?: boolean;
    }
    Index

    Properties

    onClick?: MouseEventHandler<HTMLElement>

    The click event handler for the link.

    replace?: boolean

    Whether to replace the current history entry instead of adding a new one.

    state?: Record<string, unknown>

    The state object to update when the link is clicked.

    target?: string

    The target window or frame to open the linked document in.

    toIndex?: boolean

    Whether to navigate to the index page of the linked document.