ngx-input-suffix
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

ngx-input-suffix

Angular directive that render helper text to the right of input text

Demo

ngx-input-suffix demo

Demo application

Installation

To install this library, run:

$ npm install ngx-input-suffix ngx-window-token --save

and then import module:

import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
 
import { AppComponent } from './app.component';
 
import { NgxSuffixModule } from 'ngx-input-suffix'; // <=== 
 
@NgModule({
  declarations: [
    AppComponent
  ],
  imports: [
    BrowserModule,
    NgxSuffixModule // <===
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }

Usage

ngxSuffix should place inside ngxSuffixWrapper

<div ngxSuffixWrapper>
  <input ngxSuffix=".example.com"/>
</div>

Support initial value

<div ngxSuffixWrapper>
  <input ngxSuffix=".example.com" value="domain" />
</div>
<div ngxSuffixWrapper>
  <input ngxSuffix=".angular.com" [(ngModel)]="domain" />
</div>

Customization

There is --ngx-input-suffix__text-color css variable to set suffix color. Default color is grey.

.wrapper {
  --ngx-input-suffix__text-color: black;
}

Readme

Keywords

none

Package Sidebar

Install

npm i ngx-input-suffix

Weekly Downloads

3

Version

2.0.0

License

none

Unpacked Size

219 kB

Total Files

26

Last publish

Collaborators

  • bree7e