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 * Set to true to mark the input as required.
39 * Set to true to disable editing the input.
44 reflectToAttribute: true
48 * The current value of the input.
57 * The validation pattern for the input.
62 * The type of the input (password, date, etc.).
67 * The message to display if the input value fails validation. If this
68 * is unset or the empty string, a default message is displayed depending
69 * on the type of validation error.
78 * Focuses the 'input' element.
86 this.$.events.forward(this.$.input, ['change']);