bree7e / ngx-input-suffix

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

Home Page:https://bree7e.github.io/ngx-input-suffix/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ngx-input-suffix

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>

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;
}

About

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

https://bree7e.github.io/ngx-input-suffix/


Languages

Language:TypeScript 79.8%Language:JavaScript 13.8%Language:HTML 3.5%Language:CSS 2.9%