Sanity Library Reference Docs
    Preparing search index...

    Interface PreviewProps<TLayoutKey>Beta

    interface PreviewProps<TLayoutKey = PreviewLayoutKey> {
        actions?: ReactNode | ComponentType<{ layout: TLayoutKey }>;
        children?: ReactNode;
        description?: ReactNode | ComponentType<{ layout: TLayoutKey }>;
        error?: Error;
        fallbackTitle?: ReactNode;
        imageUrl?: string;
        isPlaceholder?: boolean;
        layout?: TLayoutKey;
        media?:
            | string
            | number
            | bigint
            | boolean
            | ReactElement<unknown, string | JSXElementConstructor<any>>
            | Iterable<ReactNode, any, any>
            | ReactPortal
            | Promise<AwaitedReactNode>
            | SanityReference
            | SanityImageAsset
            | SanityAssetIdStub
            | SanityAssetUrlStub
            | SanityAssetPathStub
            | SanityImageObjectStub
            | SanityImageUploadStub
            | ComponentClass<
                { dimensions: PreviewMediaDimensions; layout: TLayoutKey },
                any,
            >
            | FunctionComponent<
                { dimensions: PreviewMediaDimensions; layout: TLayoutKey },
            >;
        mediaDimensions?: PreviewMediaDimensions;
        progress?: number;
        renderDefault: (props: PreviewProps) => Element;
        schemaType?: SchemaType;
        status?: ReactNode | ComponentType<{ layout: TLayoutKey }>;
        subtitle?: ReactNode | ComponentType<{ layout: TLayoutKey }>;
        title?: ReactNode | ComponentType<{ layout: TLayoutKey }>;
        withBorder?: boolean;
        withRadius?: boolean;
        withShadow?: boolean;
    }

    Type Parameters

    Index

    Properties

    actions?: ReactNode | ComponentType<{ layout: TLayoutKey }>
    children?: ReactNode
    description?: ReactNode | ComponentType<{ layout: TLayoutKey }>
    error?: Error
    fallbackTitle?: ReactNode
    imageUrl?: string
    isPlaceholder?: boolean
    layout?: TLayoutKey
    media?:
        | string
        | number
        | bigint
        | boolean
        | ReactElement<unknown, string | JSXElementConstructor<any>>
        | Iterable<ReactNode, any, any>
        | ReactPortal
        | Promise<AwaitedReactNode>
        | SanityReference
        | SanityImageAsset
        | SanityAssetIdStub
        | SanityAssetUrlStub
        | SanityAssetPathStub
        | SanityImageObjectStub
        | SanityImageUploadStub
        | ComponentClass<
            { dimensions: PreviewMediaDimensions; layout: TLayoutKey },
            any,
        >
        | FunctionComponent<
            { dimensions: PreviewMediaDimensions; layout: TLayoutKey },
        >
    mediaDimensions?: PreviewMediaDimensions
    progress?: number
    renderDefault: (props: PreviewProps) => Element
    schemaType?: SchemaType
    status?: ReactNode | ComponentType<{ layout: TLayoutKey }>
    subtitle?: ReactNode | ComponentType<{ layout: TLayoutKey }>
    title?: ReactNode | ComponentType<{ layout: TLayoutKey }>
    withBorder?: boolean
    withRadius?: boolean
    withShadow?: boolean