Newer Version Available

This content describes an older version of this product. View Latest

ui:inputSecret

An input field for entering secret text with type password.

A ui:inputSecret component represents a password field, which is rendered as an HTML input tag of type password.

This is a basic set up of a password field.

1<ui:inputSecret aura:id="secret" label="Pin" class="field" value="123456"/>

This example results in the following HTML.

1<div class="uiInput uiInputSecret uiInput--default uiInput--input">
2    <label class="uiLabel-left form-element__label uiLabel">
3        <span>Pin</span>
4    </label>
5    <input class="field input" type="password">
6</div>

This example displays a ui:inputSecret component with a default value.

1<aura:component>
2    <ui:inputSecret aura:id="secret" label="Pin" class="field" value="123456"/>
3</aura:component>

Attributes

Attribute Name Attribute Type Description Required?
body Component[] The body of the component. In markup, this is everything in the body of the tag.
class String A CSS style to be attached to the component. This style is added in addition to base styles output by the component.
disabled Boolean Specifies whether the component should be displayed in a disabled state. Default value is "false".
label String The text of the label component
labelClass String The CSS class of the label component
maxlength Integer The maximum number of characters that can be typed into the input field. Corresponds to the maxlength attribute of the rendered HTML input element.
placeholder String Text that is displayed when the field is empty, to prompt the user for a valid entry.
required Boolean Specifies whether the input is required. Default value is "false".
requiredIndicatorClass String The CSS class of the required indicator component
size Integer The width of the input field, in characters. Corresponds to the size attribute of the rendered HTML input element.
updateOn String Updates the component's value binding if the updateOn attribute is set to the handled event. Default value is "change".
value String The value currently in the input field.

Events

Event Name Event Type Description
dblclick COMPONENT Indicates that a component has been double-clicked.
mouseover COMPONENT Indicates that the user has moved the mouse pointer over the component.
mouseout COMPONENT Indicates that the user has moved the mouse pointer away from the component.
mouseup COMPONENT Indicates that the user has released the mouse button.
mousemove COMPONENT Indicates that the user has moved the mouse pointer.
click COMPONENT Indicates that a component has been clicked.
mousedown COMPONENT Indicates that the user has pressed a mouse key.
select COMPONENT Indicates that the user has made a selection.
blur COMPONENT Indicates that a component has been put out of focus.
focus COMPONENT Indicates that a component has been put on focus.
keypress COMPONENT Indicates that the user has pressed and held down a keyboard key.
keyup COMPONENT Indicates that the user has released a keyboard key.
keydown COMPONENT Indicates that the user has pressed and released a keyboard key.
cut COMPONENT Indicates that the user has cut content to the clipboard.
validationError COMPONENT Indicates that the component has validation error(s).
clearErrors COMPONENT Indicates that any validation error should be cleared.
change COMPONENT Indicates that the content of a component or the state has changed.
copy COMPONENT Indicates that the user has copied content to the clipboard.
paste COMPONENT Indicates that the user has pasted content from the clipboard.