{"record":{"id":"4923faff9fe22e30","repo":"vuetifyjs/vuetify","slug":"vuetify-could-not-find-usegroup-injection-with-s","errorCode":null,"errorMessage":"[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}","messagePattern":"\\[Vuetify\\] Could not find useGroup injection with symbol (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/vuetify/src/composables/group.ts","lineNumber":117,"sourceCode":"): GroupItemProvide | null {\n  const vm = getCurrentInstance('useGroupItem')\n\n  if (!vm) {\n    throw new Error(\n      '[Vuetify] useGroupItem composable must be used inside a component setup function'\n    )\n  }\n\n  const id = useId()\n\n  provide(Symbol.for(`${injectKey.description}:id`), id)\n\n  const group = inject(injectKey, null)\n\n  if (!group) {\n    if (!required) return group\n\n    throw new Error(`[Vuetify] Could not find useGroup injection with symbol ${injectKey.description}`)\n  }\n\n  const value = toRef(() => props.value)\n  const disabled = computed(() => !!(group.disabled.value || props.disabled))\n\n  function register () {\n    group?.register({ id, value, disabled }, vm)\n  }\n\n  function unregister () {\n    group?.unregister(id)\n  }\n\n  register()\n  onBeforeUnmount(() => unregister())\n\n  const isSelected = computed(() => {\n    return group.isSelected(id)","sourceCodeStart":99,"sourceCodeEnd":135,"githubUrl":"https://github.com/vuetifyjs/vuetify/blob/8d153908dffb7592eb389ddbfbab955a0ccc977f/packages/vuetify/src/composables/group.ts#L99-L135","documentation":"Thrown by useGroupItem() when inject(injectKey, null) returns null AND `required` is true (the default). The group provider (created by useGroup, e.g. VBtnToggle, VChipGroup, VItemGroup, VList) must be an ancestor providing injectKey. Without it the item has no group to register with.","triggerScenarios":"Using a group-item component (VBtn inside a toggle, VChip in a group, VRadio/VListItem with a group key) without the corresponding group provider ancestor. Also when passing the wrong injectKey, or rendering the item in a teleport/portal that breaks the provide/inject chain.","commonSituations":"Rendering VBtn with `:value` expecting toggle behavior but no VBtnToggle/VItemGroup wrapping it; a Teleport that moves the child out of the provider's subtree; a custom item using the wrong symbol key; or duplicate Vuetify installs breaking Symbol identity.","solutions":["Wrap the item in the matching group provider component (VBtnToggle, VChipGroup, VItemGroup, etc.).","If the item may legitimately stand alone, call useGroupItem(props, key, false) so a missing group returns null instead of throwing.","Ensure the injectKey matches the one provided by the ancestor group; avoid Teleport that breaks the chain."],"exampleFix":"// before\n<VBtn :value=\"1\">One</VBtn> <!-- no toggle ancestor -->\n\n// after\n<VBtnToggle v-model=\"selected\">\n  <VBtn :value=\"1\">One</VBtn>\n</VBtnToggle>\n\n// or, for a custom standalone item, make it optional:\nuseGroupItem(props, MyGroupKey, /* required */ false)","handlingStrategy":"type-guard","validationCode":"import { inject, type InjectionKey } from 'vue'\nfunction groupExists(key: InjectionKey<unknown>): boolean {\n  return inject(key, null) != null\n}","typeGuard":"import { inject, type InjectionKey } from 'vue'\nfunction hasGroupProvider<T>(key: InjectionKey<T>): boolean {\n  return inject(key, null) != null\n}","tryCatchPattern":"try {\n  useGroupItem(props, MyKey) // required by default\n} catch (e) {\n  if (e instanceof Error && /Could not find useGroup injection/.test(e.message)) {\n    // fall back: render the item standalone\n  } else throw e\n}","preventionTips":["Wrap group-item components in their matching group provider.","Pass required=false when the item can stand alone.","Avoid Teleport that removes the item from the provider's subtree."],"tags":["vuetify","group","injection","composable-misuse"],"backgroundTag":null,"analyzedSha":"8d153908dffb7592eb389ddbfbab955a0ccc977f","analyzedAt":"2026-08-12T21:54:20.596Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}