@nextcloud/viewer
    Preparing search index...

    Interface ViewerProps

    List of props provided to your custom component. Use it like this:

    <script setup lang="ts">
    import type { ViewerProps } from '@nextcloud/viewer'

    const props = defineProps<ViewerProps>()
    interface ViewerProps {
        editing: boolean;
        file: IFile;
        files: IFile[];
        isSidebarShown: boolean;
        localSource?: string;
        maxHeight: number;
        maxWidth: number;
    }
    Index
    editing: boolean

    Whether the viewer is in editing mode

    file: IFile

    The file to be displayed

    files: IFile[]

    The list of files currently opened in the viewer

    isSidebarShown: boolean

    Whether the sidebar is shown

    localSource?: string

    Optional client-side source to display instead of fetching from the server (e.g. an object URL for a freshly edited image not yet reflected in the server preview). Handlers that support it should prefer this over file.

    maxHeight: number

    The max height of the viewer container

    maxWidth: number

    The max width of the viewer container