Sanity Library Reference Docs
    Preparing search index...

    Variable viewportConst

    viewport: { initialScale: 1; viewportFit: "cover"; width: "device-width" } = ...

    In router segments (/app/studio/[[...index]]/page.tsx):

    // If you don't want to change any defaults you can just re-export the viewport config directly:
    export {viewport} from 'next-sanity/studio'

    // To customize the viewport config, spread it on the export:
    import {viewport as studioViewport} from 'next-sanity/studio'
    import type { Viewport } from 'next'

    export const viewport: Viewport = {
    ...studioViewport,
    // Overrides the viewport to resize behavior
    interactiveWidget: 'resizes-content'
    })

    Type declaration

    • initialScale: 1
    • viewportFit: "cover"
    • width: "device-width"