Input overview

Overview
API
Theme
Examples

NbInputDirective

Basic input directive.

<input nbInput></input>

Installation

Import NbInputModule to your feature module.

@NgModule({
  imports: [
    // ...
    NbInputModule,
  ],
})
export class PageModule { }

Usage

Default input size is medium:

Showcase

Inputs are available in multiple colors using status property:

Input Colors

There are three input sizes:

Input Sizes

Inputs available in different shapes, which could be combined with the other properties:

Input Shapes

nbInput could be applied to the following selectors - input, textarea:

Input Elements

You can add fullWidth attribute to make element fill container:

Full width inputs

Or you can bind control with form controls or ngModel:

Input form binding

Use <nb-form-field> to add custom content to the input field. First import NbFormFieldModule. Then put the input field and custom content into <nb-form-field> and add nbPrefix or nbSuffix directive to the custom content. nbPrefix puts content before input and nbSuffix after.

Input with icon
Input with button
Actions
Previous page
Button
Next page

Need some help or found an issue?

Ask on Stack Overflow with tag `nebular` or post an issue on GitHub.