TextBox

A single-line text box widget.

Included in: dx.phonejs.js, dx.webappjs.js, dx.all.js

The dxTextBox widget enables a user to enter a single line of text.

You can create a widget using one of the following approaches.

  • jQuery
    Use the dxTextBox jQuery plug-in.

    HTML
    <div id="textBox"></div>
    JavaScript
    $("#textBox").dxTextBox({
        placeholder: 'Type password',
        maxLength: 10,
        mode: 'password'
    });
  • Knockout
    Add a div element and apply the dxTextBox binding to this element.

    HTML
    <div data-bind="dxTextBox: {
        placeholder: 'Type password',
        maxLength: 10,
        mode: 'password'
    }"></div>
  • Angular
    Add a div element and apply the dx-text-box directive to this element.

    HTML
    <div dx-text-box="{
        placeholder: 'Type password',
        maxLength: 10,
        mode: 'password'
    }"></div>

Note that DevExtreme widgets require you to link the jQuery and Globalize libraries to your application. If you use the Knockout or Angular approach, the Knockout or Angular library is also required.

See Also

You can find detailed information on the principles of working with the widget in the dxTextBox section of the Editor Widgets article.

View Demo

Show Example:
AngularJS
Knockout
jQuery

Configuration

An object defining configuration options for the dxTextBox widget.

Methods

This section describes the members used to manipulate the widget.

Events

This section describes events exposed by this widget.