Skip to content

Commit 6ea49da

Browse files
feloyjelbourn
authored andcommitted
docs: document placeholder and floatingPlaceholder for md-input (#1485)
1 parent 3f418c3 commit 6ea49da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/lib/input/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ At the time of writing this README, the `[type]` attribute is copied to the actu
1616
The valid `type` attribute values are any supported by your browser, with the exception of `file`, `checkbox` and `radio`. File inputs aren't supported for now, while check boxes and radio buttons have their own components.
1717

1818

19+
## Placeholder
20+
21+
A placeholder is an indicative text displayed in the input zone when the input does not contain text. When text is present, the indicative text will float above this input zone.
22+
23+
You can set the `floatingPlaceholder` attribute to `false` to hide the indicative text instead when text is present in the input.
24+
25+
You can specify a placeholder for the input in one of two ways; either using the `placeholder` attribute, or using an `<md-placeholder>` directive in the `<md-input>`. Using both will raise an error.
26+
1927

2028
## Prefix and Suffix
2129

0 commit comments

Comments
 (0)