Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@capacitor/keyboard

Package Overview
Dependencies
Maintainers
8
Versions
639
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capacitor/keyboard

The Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.

  • 6.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
169K
increased by0.89%
Maintainers
8
Weekly downloads
 
Created

What is @capacitor/keyboard?

@capacitor/keyboard is a Capacitor plugin that provides keyboard-related functionalities for mobile applications. It allows developers to manage the keyboard's behavior, such as showing or hiding the keyboard, listening to keyboard events, and adjusting the viewport when the keyboard is displayed.

What are @capacitor/keyboard's main functionalities?

Show Keyboard

This feature allows you to programmatically show the keyboard.

import { Keyboard } from '@capacitor/keyboard';

Keyboard.show();

Hide Keyboard

This feature allows you to programmatically hide the keyboard.

import { Keyboard } from '@capacitor/keyboard';

Keyboard.hide();

Listen to Keyboard Events

This feature allows you to listen to keyboard events such as when the keyboard is about to show or hide.

import { Keyboard } from '@capacitor/keyboard';

Keyboard.addListener('keyboardWillShow', info => {
  console.log('Keyboard will show with height:', info.keyboardHeight);
});

Keyboard.addListener('keyboardWillHide', () => {
  console.log('Keyboard will hide');
});

Set Accessory Bar Visibility

This feature allows you to set the visibility of the accessory bar above the keyboard.

import { Keyboard } from '@capacitor/keyboard';

Keyboard.setAccessoryBarVisible({ isVisible: true });

Set Resize Mode

This feature allows you to set the resize mode of the web view when the keyboard is displayed. Modes include 'native', 'ionic', and 'body'.

import { Keyboard } from '@capacitor/keyboard';

Keyboard.setResizeMode({ mode: 'native' });

Other packages similar to @capacitor/keyboard

Keywords

FAQs

Package last updated on 19 Nov 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc