diff --git a/core/src/components.d.ts b/core/src/components.d.ts index fa3c05f3e6..89e5e92ed2 100644 --- a/core/src/components.d.ts +++ b/core/src/components.d.ts @@ -1081,7 +1081,7 @@ export namespace Components { */ "pattern"?: string; /** - * Instructional text that shows before the input has a value. + * Instructional text that shows before the input has a value. This property applies only when the `type` property is set to `"email"`, `"number"`, `"password"`, `"search"`, `"tel"`, `"text"`, or `"url"`, otherwise it is ignored. */ "placeholder"?: string; /** @@ -4802,7 +4802,7 @@ declare namespace LocalJSX { */ "pattern"?: string; /** - * Instructional text that shows before the input has a value. + * Instructional text that shows before the input has a value. This property applies only when the `type` property is set to `"email"`, `"number"`, `"password"`, `"search"`, `"tel"`, `"text"`, or `"url"`, otherwise it is ignored. */ "placeholder"?: string; /** diff --git a/core/src/components/input/input.tsx b/core/src/components/input/input.tsx index 668349f06e..ea8640448c 100644 --- a/core/src/components/input/input.tsx +++ b/core/src/components/input/input.tsx @@ -151,6 +151,8 @@ export class Input implements ComponentInterface { /** * Instructional text that shows before the input has a value. + * This property applies only when the `type` property is set to `"email"`, + * `"number"`, `"password"`, `"search"`, `"tel"`, `"text"`, or `"url"`, otherwise it is ignored. */ @Prop() placeholder?: string; diff --git a/core/src/components/input/readme.md b/core/src/components/input/readme.md index 414371ee77..8b601fe741 100644 --- a/core/src/components/input/readme.md +++ b/core/src/components/input/readme.md @@ -340,7 +340,7 @@ export default defineComponent({ | `multiple` | `multiple` | If `true`, the user can enter more than one value. This attribute applies when the type attribute is set to `"email"` or `"file"`, otherwise it is ignored. | `boolean \| undefined` | `undefined` | | `name` | `name` | The name of the control, which is submitted with the form data. | `string` | `this.inputId` | | `pattern` | `pattern` | A regular expression that the value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, `"date"`, or `"password"`, otherwise it is ignored. When the type attribute is `"date"`, `pattern` will only be used in browsers that do not support the `"date"` input type natively. See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/date for more information. | `string \| undefined` | `undefined` | -| `placeholder` | `placeholder` | Instructional text that shows before the input has a value. | `string \| undefined` | `undefined` | +| `placeholder` | `placeholder` | Instructional text that shows before the input has a value. This property applies only when the `type` property is set to `"email"`, `"number"`, `"password"`, `"search"`, `"tel"`, `"text"`, or `"url"`, otherwise it is ignored. | `string \| undefined` | `undefined` | | `readonly` | `readonly` | If `true`, the user cannot modify the value. | `boolean` | `false` | | `required` | `required` | If `true`, the user must fill in a value before submitting a form. | `boolean` | `false` | | `size` | `size` | The initial size of the control. This value is in pixels unless the value of the type attribute is `"text"` or `"password"`, in which case it is an integer number of characters. This attribute applies only when the `type` attribute is set to `"text"`, `"search"`, `"tel"`, `"url"`, `"email"`, or `"password"`, otherwise it is ignored. | `number \| undefined` | `undefined` |