{"record":{"id":"83b4b3f79a287f52","repo":"emberjs/ember.js","slug":"ember-glimmer-input-checkbox","errorCode":"ember-glimmer.input.checkbox","errorMessage":"`<Input @type=\"checkbox\" />` reflects its checked state via the `@checked` argument. You wrote `<Input @type=\"checkbox\" @value={{...}} />` which is likely not what you intended. Did you mean `<Input @type=\"checkbox\" @checked={{...}} />`?","messagePattern":"`<Input @type=\"checkbox\" />` reflects its checked state via the `@checked` argument\\. You wrote `<Input @type=\"checkbox\" @value=(.+?)\\} />` which is likely not what you intended\\. Did you mean `<Input @type=\"checkbox\" @checked=(.+?)\\} />`\\?","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/@ember/-internals/glimmer/lib/components/input.ts","lineNumber":188,"sourceCode":"    }\n\n    assert(\n      'The `@type` argument to the <Input> component must be a string',\n      typeof type === 'string'\n    );\n\n    return isValidInputType(type) ? type : 'text';\n  }\n\n  get isCheckbox(): boolean {\n    return this.named('type') === 'checkbox';\n  }\n\n  private _checked = valueFrom(this.args.named['checked']);\n\n  get checked(): unknown {\n    if (this.isCheckbox) {\n      warn(\n        '`<Input @type=\"checkbox\" />` reflects its checked state via the `@checked` argument. ' +\n          'You wrote `<Input @type=\"checkbox\" @value={{...}} />` which is likely not what you intended. ' +\n          'Did you mean `<Input @type=\"checkbox\" @checked={{...}} />`?',\n        untrack(\n          () =>\n            this.args.named['checked'] !== undefined ||\n            this.args.named['value'] === undefined ||\n            typeof valueForRef(this.args.named['value']) === 'string'\n        ),\n        { id: 'ember.built-in-components.input-checkbox-value' }\n      );\n\n      return this._checked.get();\n    } else {\n      return undefined;\n    }\n  }\n","sourceCodeStart":170,"sourceCodeEnd":206,"githubUrl":"https://github.com/emberjs/ember.js/blob/26f97246a8bf2e28edf26ac3093da2e86c04ffc5/packages/@ember/-internals/glimmer/lib/components/input.ts#L170-L206","documentation":"The Input component's checked getter warns (code ember-glimmer.input.checkbox) when a checkbox-type <Input> is given @value instead of @checked. For checkboxes, the checked state is bound via @checked; @value is almost always a developer mistake (copied from text-input usage).","triggerScenarios":"Rendering <Input @type=\"checkbox\" @value={{someBool}} /> — isCheckbox true while named args include @value (without @checked defined), triggering the assert during the checked getter.","commonSituations":"Copying an <Input> snippet from a text field and changing type to checkbox; migrating from classic {{input type='checkbox'}} helpers; misunderstanding that @value on a checkbox sets the hidden value attribute, not checkedness.","solutions":["Replace @value with @checked to bind the checkbox state.","Keep @value only if you intentionally need the value attribute submitted with the form.","Use <Checkbox> style native input if you need raw control.","Search templates for 'checkbox' inputs using @value to fix all instances."],"exampleFix":"// before\n<Input @type=\"checkbox\" @value={{this.isEnabled}} />\n// after\n<Input @type=\"checkbox\" @checked={{this.isEnabled}} />","handlingStrategy":"validation","validationCode":"// Template-level guard: only pass @checked on checkbox Inputs\nconst isCheckboxInput = (args) => args.type === 'checkbox' && args.value !== undefined && args.checked === undefined;\nif (isCheckboxInput(this.args.named)) console.warn('use @checked for checkbox state');","typeGuard":"function usesChecked(inputArgs) { return inputArgs.type === 'checkbox' && inputArgs.checked !== undefined; }","tryCatchPattern":"null","preventionTips":["Always bind checkbox state with @checked, not @value.","Lint templates for <Input @type=\"checkbox\" @value= patterns.","Read the Input component docs: @value only sets the value attribute on checkboxes.","Copy input snippets carefully when changing type from text to checkbox."],"tags":["ember","glimmer","components","input"],"backgroundTag":"checkbox-value-misuse","analyzedSha":"26f97246a8bf2e28edf26ac3093da2e86c04ffc5","analyzedAt":"2026-09-01T05:01:28.182Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}