Socket
Socket
Sign inDemoInstall

ngx-touch-keyboard

Package Overview
Dependencies
8
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    ngx-touch-keyboard

Virtual Keyboard for Angular applications


Version published
Weekly downloads
120
increased by2.56%
Maintainers
1
Install size
520 kB
Created
Weekly downloads
 

Changelog

Source

[3.1.0] - 2023-08-16

Added

  • Added Georgian Locale.

Readme

Source

AngularTouchKeyboard

MIT licensed npm version Build Status

What is this?

Virtual Keyboard for Angular applications.

angular touch keyboard

Demo

https://mohsen77sk.github.io/angular-touch-keyboard/

Install

Step 1: Install ngx-touch-keyboard

npm install @angular/cdk ngx-touch-keyboard

Step 2: Import the module

Add ngxTouchKeyboardModule as an import in your app's root NgModule.

import { ngxTouchKeyboardModule }  from 'ngx-touch-keyboard';
@NgModule({
  ...
  imports: [
    ...
    ngxTouchKeyboardModule,
  ],
  ...
})
export class AppModule { }

Compatibility

Version [3.0.0]
  • @angular/core: ^16.0.0
  • @angular/cdk: ^16.0.0
Version [2.0.0]
  • @angular/core: ^14.0.0 || ^15.0.0
  • @angular/cdk: ^14.0.0 || ^15.0.0

Localization

AngularTouchKeyboard is localized in 5 keyboard-specific locales:

  • en-US English (United States) (default)
  • en-UK English (United Kingdom)
  • fa-IR Persian (Iran)
  • sv-SE Swedish (Sweden)
  • ka-GE Georgian (Georgia)

Usage

Simple usage example

<input
  type="text"
  ngxTouchKeyboard
  #touchKeyboard="ngxTouchKeyboard"
  (focus)="touchKeyboard.openPanel()"
/>

Locale usage example

<input
  type="text"
  ngxTouchKeyboard="fa-IR"
  #touchKeyboard="ngxTouchKeyboard"
  (focus)="touchKeyboard.openPanel()"
/>

Material usage example

<mat-form-field>
  <mat-label>Default</mat-label>
  <input
    matInput
    type="text"
    ngxTouchKeyboard
    #touchKeyboard="ngxTouchKeyboard"
  />
  <button
    mat-icon-button
    matSuffix
    type="button"
    (click)="touchKeyboard.togglePanel()"
  >
    <mat-icon> keyboard </mat-icon>
  </button>
</mat-form-field>

Properties

PropertyDescription
ngxTouchKeyboardRequired to initialize Virtual Keyboard to specified input.
ngxTouchKeyboardDebugDebug mode is on.
ngxTouchKeyboardFullScreenFull screen mode is on.

Methods

Here's the list of all available methods:

MethodsDescription
openPanel(): voidOpen keyboard panel
closePanel(): voidClose keyboard panel
togglePanel(): voidToggle keyboard panel

Themes

Built-in themes

  • default: white theme
  • dark: dark theme

You must put the class dark in the body to use the dark theme.

Create custom theme

To customize the theme, you need to use css variables.

NameDescription
--tk-color-textcolor of text button
--tk-backgroundcolor of background panel
--tk-background-buttoncolor of background basic button
--tk-background-button-fncolor of background functional button
--tk-background-button-activecolor of background active button

Layouts

Depends on attribute inputmode, the keyboard layout is changed.

inputmodeScreenshot
inputmode='text'angular touch keyboard
inputmode='search'angular touch keyboard
inputmode='email'angular touch keyboard
inputmode='url'angular touch keyboard
inputmode='numeric'angular touch keyboard
inputmode='decimal'angular touch keyboard
inputmode='tel'angular touch keyboard

Development

The most useful commands for development are:

  • npm run start to start a development server
  • npm run build-demo to build the demo locally (it will be published automatically by GitHub Actions)

License

The MIT License (MIT)

Keywords

FAQs

Last updated on 16 Aug 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc