1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
7 * `cr-input` is a single-line text field for user input. It is a convenience
8 * element wrapping `paper-input`.
12 * <cr-input></cr-input>
14 * @group Chrome Elements
22 * The label for this input. It normally appears as grey text inside
23 * the text input and disappears once the user enters text.
31 * Propagate the no-label-float property.
39 * Set to true to mark the input as required.
47 * Set to true to disable editing the input.
52 reflectToAttribute: true
56 * The current value of the input.
65 * The validation pattern for the input.
70 * The type of the input (password, date, etc.).
75 * The message to display if the input value fails validation. If this
76 * is unset or the empty string, a default message is displayed depending
77 * on the type of validation error.
86 * Focuses the 'input' element.
89 this.$.input.inputElement.focus();
94 this.$.events.forward(this.$.input, ['change']);