{"record":{"id":"47d44f89dd118478","repo":"vuetifyjs/vuetify","slug":"easing-function-options-easing-not-found","errorCode":null,"errorMessage":"Easing function \"${options.easing}\" not found.","messagePattern":"Easing function \"(.+?)\" not found\\.","errorType":"exception","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/composables/goto.ts","lineNumber":88,"sourceCode":"\nexport async function scrollTo (\n  _target: ComponentPublicInstance | HTMLElement | number | string,\n  _options: GoToOptions,\n  horizontal?: boolean,\n  goTo?: GoToInstance,\n) {\n  const property = horizontal ? 'scrollLeft' : 'scrollTop'\n  const options = mergeDeep(goTo?.options ?? genDefaults(), _options)\n  const rtl = goTo?.rtl.value\n  const target = (typeof _target === 'number' ? _target : getTarget(_target)) ?? 0\n  const container = options.container === 'parent' && target instanceof HTMLElement\n    ? target.parentElement!\n    : getContainer(options.container)\n  const ease = PREFERS_REDUCED_MOTION() ? options.patterns.instant\n    : typeof options.easing === 'function' ? options.easing\n    : options.patterns[options.easing]\n\n  if (!ease) throw new TypeError(`Easing function \"${options.easing}\" not found.`)\n\n  let targetLocation: number\n  if (typeof target === 'number') {\n    targetLocation = getOffset(target, horizontal, rtl)\n  } else {\n    targetLocation = getOffset(target, horizontal, rtl) - getOffset(container, horizontal, rtl)\n\n    if (options.layout) {\n      const styles = window.getComputedStyle(target)\n      const layoutOffset = styles.getPropertyValue('--v-layout-top')\n\n      if (layoutOffset) targetLocation -= parseInt(layoutOffset, 10)\n    }\n  }\n\n  targetLocation += options.offset\n  targetLocation = clampTarget(container, targetLocation, !!rtl, !!horizontal)\n","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/composables/goto.ts#L70-L106","documentation":"Thrown by scrollTo() in the goto composable when the resolved easing is falsy. Easing is resolved from options.patterns[options.easing] (a named key) or, if options.easing is a function, used directly. If the name does not match any key in patterns (and it is not a function), it throws a TypeError.","triggerScenarios":"Passing a VBtn/`v-btn` with `:to`-style scroll, or calling useGoTo()(...).go(target, { easing: 'bounce' }) where 'bounce' is not in the patterns map. Default patterns include keys like 'linear', 'easeInOutCubic', etc.","commonSituations":"Custom easing name that does not exist in the default pattern set, typo in the easing string, or passing a CSS easing curve string (meant for transitions) into the JS scroll API.","solutions":["Use a built-in easing name (e.g. 'linear', 'easeInOutCubic') or pass an easing function (t => number).","Extend options.patterns with your custom easing name when configuring VGoTo / createVuetify goto.","Omit `easing` to use the default."],"exampleFix":"// before\nconst { goTo } = useGoTo()\ngoTo('#section', { easing: 'bounce' }) // throws\n\n// after\nconst { goTo } = useGoTo()\ngoTo('#section', { easing: 'easeInOutCubic' })\n// or a custom function:\ngoTo('#section', { easing: t => 1 - Math.pow(1 - t, 3) })","handlingStrategy":"validation","validationCode":"function resolveEasing(nameOrFn: string | ((t: number) => number), patterns: Record<string, (t: number) => number>) {\n  if (typeof nameOrFn === 'function') return nameOrFn\n  const fn = patterns[nameOrFn]\n  if (!fn) throw new TypeError(`Unknown easing: ${nameOrFn}`)\n  return fn\n}","typeGuard":"function isEasingName(v: unknown, patterns: Record<string, unknown>): v is string {\n  return typeof v === 'string' && v in patterns\n}","tryCatchPattern":"try {\n  goTo('#sec', { easing: customName })\n} catch (e) {\n  if (e instanceof TypeError && /Easing function/.test(e.message)) {\n    goTo('#sec', { easing: 'easeInOutCubic' })\n  } else throw e\n}","preventionTips":["Whitelist easing names against the configured patterns.","Pass a function for custom curves to avoid name lookups.","Document the default patterns keys for your team."],"tags":["goto","scroll","easing","input-validation"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}