0.0.11 • Published 2 years ago

ngxm-input v0.0.11

Weekly downloads
-
License
-
Repository
github
Last release
2 years ago

Ngxm-input - simplify, lightweight all in one input for Angular.

See demo page.

##Features

  • Correct behavior show errors message by default
  • Password eye option
  • Loop type search icon
  • Style in css variables
  • Reactive form support
  • JS logic MaxLength

##Getting started

###Step 1: Install:

NPM

npm i --save ngxm-input

###Step 2: Import the NgxmInputModule and angular FormsModule module:

import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { NgxmInputModule } from '../../../ngxm-input/src/lib/ngxm-input.module';

@NgModule({
declarations: [AppComponent],
imports: [
  BrowserModule,
  BrowserAnimationsModule,
  ReactiveFormsModule,
  NgxmInputModule,
  FormsModule,
],
bootstrap: [AppComponent],
})
export class AppModule {}

Usage

<form [formGroup]="form" class="demo-box">
  <h1>Example</h1>
  <ngmx-input
    [label]="'Demo input'"
    [formControlName]="'testControl'"
  >
  </ngmx-input>
</form>

API

Inputs

InputTypeDefaultRequiredDescription
typetext, number, password, searchtextnoType input
labelstringnullnoLabel for input
patternstring, RegExpnullnoPattern validation
enableLoopbooleanfalsenoLoop icon for search type input
enableEyebooleanfalsenoEye icon logic for password type input
errorstringnullnoError text
requiredbooleanfalsenoRequired attribute and show * in label flag
descriptionstringnullnoDescription text
formControlNamestringnullnoControl form angular
placeholderstringnullnoPlaceholder text
maxLengthnumbernullnoMax-length parameter
disableErrorMessagebooleanfalsenoShow/hide error message flag
0.0.10

2 years ago

0.0.11

2 years ago

0.0.3

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.7

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago