Input Module

A basic HTML input control for entering text, numbers, or passwords. Note that checkbox and radio types are supported through the Checklist and RadioItems component. Dates, times, and file uploads are also supported through separate components.

Types

Type Description

Attr

A list of children or a property for this dash component

Input

A basic HTML input control for entering text, numbers, or passwords. Note that checkbox and radio types are supported through the Checklist and RadioItems component. Dates, times, and file uploads are also supported through separate components.

Prop

• value (string | number) - The value of the input • style (record) - The input's inline styles • className (string) - The class of the input element • debounce (boolean; default false) - If true, changes to input will be sent back to the Dash server only on enter or when losing focus. If it's false, it will sent the value back on every change. • type (value equal to: 'text', 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden'; default text) - The type of control to render. • autoComplete (string) - This attribute indicates whether the value of the control can be automatically completed by the browser. • autoFocus (value equal to: 'autoFocus', 'autofocus', 'AUTOFOCUS' | boolean) - The element should be automatically focused after the page loaded. autoFocus is an HTML boolean attribute - it is enabled by a boolean or 'autoFocus'. Alternative capitalizations `autofocus` & `AUTOFOCUS` are also acccepted. • disabled (value equal to: 'disabled', 'DISABLED' | boolean) - If true, the input is disabled and can't be clicked on. disabled is an HTML boolean attribute - it is enabled by a boolean or 'disabled'. Alternative capitalizations `DISABLED` • inputMode (value equal to: 'verbatim', 'latin', 'latin-name', 'latin-prose', 'full-width-latin', 'kana', 'katakana', 'numeric', 'tel', 'email', 'url') - Provides a hint to the browser as to the type of data that might be entered by the user while editing the element or its contents. • list (string) - Identifies a list of pre-defined options to suggest to the user. The value must be the id of a element in the same document. The browser displays only options that are valid values for this input element. This attribute is ignored when the type attribute's value is hidden, checkbox, radio, file, or a button type. • max (string | number) - The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value. • maxLength (string | number) - If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in UTF-16 code units) that the user can enter. For other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior (i.e. the user can enter an unlimited number of characters). The constraint is evaluated only when the value of the attribute has been changed. • min (string | number) - The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value. • minLength (string | number) - If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. For other control types, it is ignored. • multiple (boolean) - This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the type attribute is set to email or file, otherwise it is ignored. • name (string) - The name of the control, which is submitted with the form data. • pattern (string) - A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email, or password, otherwise it is ignored. The regular expression language is the same as JavaScript RegExp algorithm, with the 'u' parameter that makes it treat the pattern as a sequence of unicode code points. The pattern is not surrounded by forward slashes. • placeholder (string | number) - A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a

Functions and values

Function or value Description

Input.input id attrs

Full Usage: Input.input id attrs

Parameters:
    id : string
    attrs : Attr list

Returns: DashComponent

A basic HTML input control for entering text, numbers, or passwords. Note that checkbox and radio types are supported through the Checklist and RadioItems component. Dates, times, and file uploads are also supported through separate components. Properties: • id (string) - The ID of this component, used to identify dash components in callbacks. The ID needs to be unique across all of the components in an app. • value (string | number) - The value of the input • style (record) - The input's inline styles • className (string) - The class of the input element • debounce (boolean; default false) - If true, changes to input will be sent back to the Dash server only on enter or when losing focus. If it's false, it will sent the value back on every change. • type (value equal to: 'text', 'number', 'password', 'email', 'range', 'search', 'tel', 'url', 'hidden'; default text) - The type of control to render. • autoComplete (string) - This attribute indicates whether the value of the control can be automatically completed by the browser. • autoFocus (value equal to: 'autoFocus', 'autofocus', 'AUTOFOCUS' | boolean) - The element should be automatically focused after the page loaded. autoFocus is an HTML boolean attribute - it is enabled by a boolean or 'autoFocus'. Alternative capitalizations `autofocus` & `AUTOFOCUS` are also acccepted. • disabled (value equal to: 'disabled', 'DISABLED' | boolean) - If true, the input is disabled and can't be clicked on. disabled is an HTML boolean attribute - it is enabled by a boolean or 'disabled'. Alternative capitalizations `DISABLED` • inputMode (value equal to: 'verbatim', 'latin', 'latin-name', 'latin-prose', 'full-width-latin', 'kana', 'katakana', 'numeric', 'tel', 'email', 'url') - Provides a hint to the browser as to the type of data that might be entered by the user while editing the element or its contents. • list (string) - Identifies a list of pre-defined options to suggest to the user. The value must be the id of a element in the same document. The browser displays only options that are valid values for this input element. This attribute is ignored when the type attribute's value is hidden, checkbox, radio, file, or a button type. • max (string | number) - The maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value. • maxLength (string | number) - If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the maximum number of characters (in UTF-16 code units) that the user can enter. For other control types, it is ignored. It can exceed the value of the size attribute. If it is not specified, the user can enter an unlimited number of characters. Specifying a negative number results in the default behavior (i.e. the user can enter an unlimited number of characters). The constraint is evaluated only when the value of the attribute has been changed. • min (string | number) - The minimum (numeric or date-time) value for this item, which must not be greater than its maximum (max attribute) value. • minLength (string | number) - If the value of the type attribute is text, email, search, password, tel, or url, this attribute specifies the minimum number of characters (in Unicode code points) that the user can enter. For other control types, it is ignored. • multiple (boolean) - This Boolean attribute indicates whether the user can enter more than one value. This attribute applies when the type attribute is set to email or file, otherwise it is ignored. • name (string) - The name of the control, which is submitted with the form data. • pattern (string) - A regular expression that the control's value is checked against. The pattern must match the entire value, not just some subset. Use the title attribute to describe the pattern to help the user. This attribute applies when the value of the type attribute is text, search, tel, url, email, or password, otherwise it is ignored. The regular expression language is the same as JavaScript RegExp algorithm, with the 'u' parameter that makes it treat the pattern as a sequence of unicode code points. The pattern is not surrounded by forward slashes. • placeholder (string | number) - A hint to the user of what can be entered in the control . The placeholder text must not contain carriage returns or line-feeds. Note: Do not use the placeholder attribute instead of a

id : string
attrs : Attr list
Returns: DashComponent