Skip to content
Enact

limestone/Input

Popup style inputs for text and numbers.

Provides an input in the form of a popup.

Usage:

<Input
  onComplete={this.handleInputComplete}
  placeholder="Placeholder"
  subtitle="TitleBelow"
  title="Title"
/>

By default, Input maintains the state of its value property. Supply the defaultValue property to control its initial value. If you wish to directly control updates to the component, supply a value to value at creation time and update it in response to onChange events.

Extends: limestone/Inputlimestone/Input.InputBase

Base component for providing text input in the form of a popup.

Properties

Disables the button that activates the input popup.


Text displayed when value is not set.

Default: '-'

'large''small'

The size of the input field.

Default: 'small'

'text''password''number''passwordnumber''url''tel''passwordtel'

Type of the input.

Default: 'text'

The value of the input.

Limestone specific item behaviors to apply to limestone/Inputlimestone/Input.InputBase.

Includes: ui/Toggleableui/Toggleable.Toggleable
Includes: ui/Changeableui/Changeable.Changeable
Includes: limestone/Skinnablelimestone/Skinnable.Skinnable

A Spottable, Limestone styled input component with embedded icon support.

By default, InputField maintains the state of its value property. Supply the defaultValue property to control its initial value. If you wish to directly control updates to the component, supply a value to value at creation time and update it in response to onChange events.

Extends: limestone/Inputlimestone/Input.InputFieldBase
Wrapped with: ui/Changeableui/Changeable.Changeable
Wrapped with: spotlight/Spottablespotlight/Spottable.Spottable
Wrapped with: limestone/Skinnablelimestone/Skinnable.Skinnable

Properties

Focuses the internal input when the component gains 5-way focus.

By default, the internal input is not editable when the component is focused via 5-way and must be selected to become interactive. In pointer mode, the input will be editable when clicked.

Default: false

Applies a disabled style and prevents interacting with the component.

Default: false

Sets the initial value.


Blurs the input when the "enter" key is pressed.

Default: false

Called when the internal input is focused.


Called when the internal input loses focus.


Function

Called when the component is removed when it had focus.


Disables spotlight navigation into the component.

Default: false

A Limestone styled input component.

It supports start and end icons, but it does not support Spotlight. Apps should use limestone/Inputlimestone/Input.InputField.

Properties

Passed by AnnounceDecorator for accessibility.


Moves the caret to the end of the text when the input receives focus.

Default: false

Disables InputField and becomes non-interactive.

Default: false

Blurs the input when the "enter" key is pressed.

Default: false

The icon to be placed at the end of the input.


The icon to be placed at the beginning of the input.


Indicates limestone/Inputlimestone/Input.InputFieldBase.value is invalid and shows limestone/Inputlimestone/Input.InputFieldBase.invalidMessage, if set.

Default: false

The tooltip text to be displayed when the input is limestone/Inputlimestone/Input.InputFieldBase.invalid.

If this value is falsy, the tooltip will be shown with the default message.

Default: 'Please enter a valid value.'

Wraps the input's value/placeholder display in a marquee.

Default: false

Called before the input value is changed.

The change can be prevented by calling preventDefault on the event.


Called when blurred.


Called when the input value is changed.

The event payload includes the current value as well as a stopPropagation() method which may be called to stop the original onChange event from the <input> from bubbling.


Called when clicked.


Called when focused.


Called when a key is pressed down.


Text to display when limestone/Inputlimestone/Input.InputFieldBase.value is not set.

Default: ''

'large''small'

The size of the input field.

Default: 'small'

The type of input.

Accepted values correspond to the standard HTML5 input types.

Default: 'text'

The value of the input.

Limestone specific item behaviors to apply to limestone/Inputlimestone/Input.InputFieldBase.

Includes: ui/Changeableui/Changeable.Changeable
Includes: limestone/Skinnablelimestone/Skinnable.Skinnable

Provides an input popup without button.

Usage:

<InputPopup
  open={this.state.open}
  onComplete={this.handleInputPopupComplete}
  placeholder="Placeholder"
  subtitle="Subtitle"
  title="Title"
/>

By default, InputPopup maintains the state of its value property. Supply the defaultValue property to control its initial value. If you wish to directly control updates to the component, supply a value to value at creation time and update it in response to onChange events.

Extends: limestone/Inputlimestone/Input.InputPopupBase

Base component for providing text input in the form of a popup without button.

Properties

Passed by AnnounceDecorator for accessibility.


Sets the hint string read when focusing the back button.

Default: 'go to previous'

ElementArray(Element)

Buttons to be included under the component.

Typically, up to 3 buttons are used.


Customize component style


StringNumber

Initial value of the input.

This value is used for setting the defaultValue of the InputField.


Disables the input popup.


Sets spotlightId to InputField.


Indicates the value is invalid and shows limestone/Inputlimestone/Input.InputPopupBase.invalidMessage, if set.


The tooltip text to be displayed when the input is limestone/Inputlimestone/Input.InputPopupBase.invalid.

If this value is falsy, the tooltip will be shown with the default message.

Default: 'Please enter a valid value.'

Set the length of number input field.

Sets the amount of numbers this field will collect. Any number between 1 and 6 (inclusive) will render individual number cells, greater than 6 will render a single box with numbers in it. This only has an effect on 'number' and 'passwordnumber' type and when numberInputField is 'auto'.

This value will override minLength and maxLength.


Wraps the InputField's value display in a marquee.

Default: false

The maximum length of number input fields.

Overridden by length value.

Default: 4

The minimum length of number input fields.

Overridden by length value.

When smaller than maxLength, number type inputs will show a submit button and will not auto-submit when the length reaches maxLength. Defaults to the maxLength value.


Omits the back button.


Omits the submit button.


'auto''separated''joined''field'

The type of numeric input to use.

The default is to display separated digits when length is less than 7. If field is set, a standard InputField will be used instead of the normal number input.

This has no effect on other limestone/Inputlimestone/Input.InputPopupBase.type.

Default: 'auto'

Called before the input value is changed.

The change can be prevented by calling preventDefault on the event.


Called when the input value is changed.


Called when the popup is closed.


Called when input is complete.


Called when the popup is opened.


Opens the popup.


Text displayed when value is not set.


The "aria-label" for the popup when opened.


'fullscreen''overlay'

Type of popup.

Default: 'fullscreen'

'large''small'

Size of the input field.

Default: 'small'

Subtitle below the title of popup.

Default: ''

Title text of popup.

Default: ''

'text''password''number''passwordnumber''url''tel''passwordtel'

Type of the input.

Default: 'text'