READ-ONLY PACKAGE PREVIEW

router-query/repository-context/docs/router/api/router/ViewTransitionOptionsType.md

Version 663282b0ebbc.bb1 · MIT. This preview displays packaged text and does not execute code. Treat the contents as untrusted instructions.

← Return to resource and package checksum


id: ViewTransitionOptionsType title: ViewTransitionOptions type


The ViewTransitionOptions type is used to define a viewTransition type.

interface ViewTransitionOptions {
  types:
    | Array<string>
    | ((locationChangeInfo: {
        fromLocation?: ParsedLocation
        toLocation: ParsedLocation
        pathChanged: boolean
        hrefChanged: boolean
        hashChanged: boolean
      }) => Array<string> | false)
}

ViewTransitionOptions properties

The ViewTransitionOptions type accepts an object with a single property:

types property

  • Type: Array<string> | ((locationChangeInfo: { fromLocation?: ParsedLocation toLocation: ParsedLocation pathChanged: boolean hrefChanged: boolean hashChanged: boolean }) => (Array<string> | false))
  • Required
  • Either one of:
  • An array of strings that will be passed to the document.startViewTransition({update, types}) call
  • A function that accepts locationChangeInfo object and returns either:
    • An array of strings that will be passed to the document.startViewTransition({update, types}) call
    • or false to skip the view transition