Hiyve Components - v1.0.0
    Preparing search index...
    interface UseThumbnailOptions {
        enabled?: boolean;
        file: FileEntry;
        generators: ThumbnailGenerator[];
        getFileUrl: (file: FileEntry) => Promise<string>;
        maxDimension?: number;
        visible?: boolean;
    }
    Index

    Properties

    enabled?: boolean

    Permission to run generators. When false, the hook resolves from the cache but does not run any generator. Defaults to true.

    file: FileEntry

    The file to resolve a thumbnail for.

    generators: ThumbnailGenerator[]

    Generators tried in order; the first one whose canHandle returns true runs.

    getFileUrl: (file: FileEntry) => Promise<string>

    Resolve a fetch-able URL for the file (e.g. a presigned S3 URL).

    maxDimension?: number

    Longest edge of the generated thumbnail, in pixels. Defaults to 320.

    visible?: boolean

    Live visibility of the consuming element. When false, the hook does no work at all — no cache read, no generation — and any in-flight generation is aborted; an already-resolved thumbnail is retained. Defaults to true.