{"_id":"@cantoo/keyboard","_rev":"3-0acf5205731b2e73c6ce67dafc02c6ea","name":"@cantoo/keyboard","dist-tags":{"latest":"7.0.5"},"versions":{"7.0.4":{"name":"@cantoo/keyboard","version":"7.0.4","keywords":["capacitor","plugin","native"],"author":{"name":"Ionic","email":"hi@ionicframework.com"},"license":"MIT","_id":"@cantoo/keyboard@7.0.4","maintainers":[{"name":"sharcoux","email":"f.billioud@gmail.com"},{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},{"name":"matheusrdsantos","email":"matheus.r.d.s10@hotmail.com"},{"name":"gabrielnsd","email":"gabrielnsdantas@gmail.com"},{"name":"nicodemos234","email":"nicodemos54324@gmail.com"}],"homepage":"https://github.com/cantoo-scribe/capacitor-keyboard#readme","bugs":{"url":"https://github.com/cantoo-scribe/capacitor-keyboard/issues"},"dist":{"shasum":"89f2d2c21f3bdc1f3e9128f6c778f50e9b37e402","tarball":"https://registry.npmjs.org/@cantoo/keyboard/-/keyboard-7.0.4.tgz","fileCount":25,"integrity":"sha512-HkfarAXCxMoQcJ+4+KsyemPwugSXo3er5QETd6M4eRNki3ZB6XfF70ZFqgHxKzPsdqVJMRoBQoW+ttFOxkbFzw==","signatures":[{"sig":"MEUCIB+UEBGZzzNqiv4uKNvwbzPJTLCK/ZmL2xP+xqjxXd5KAiEAwZpHbBQep1vFC5hEXwCRgrqaImqoIQaMBV3U2coq2hY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":91567},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","gitHead":"e6a59f7092d92e039dd9d4943b7a51c1e240573d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api KeyboardPlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"xcodebuild build -scheme CapacitorKeyboard -destination generic/platform=iOS","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","publish:cocoapod":"pod trunk push ./CantooKeyboard.podspec --allow-warnings"},"_npmUser":{"name":"gabrielnsd","email":"gabrielnsdantas@gmail.com"},"prettier":"@ionic/prettier-config","capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/cantoo-scribe/capacitor-keyboard.git","type":"git"},"_npmVersion":"9.5.1","description":"The Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.","directories":{},"_nodeVersion":"24.5.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.57.0","rimraf":"^6.0.1","rollup":"^4.26.0","prettier":"~2.3.0","swiftlint":"^1.0.1","typescript":"~4.1.5","@capacitor/cli":"^7.0.0","@capacitor/ios":"^7.0.0","@capacitor/core":"^7.0.0","@capacitor/docgen":"0.2.2","@capacitor/android":"^7.0.0","@ionic/eslint-config":"^0.4.0","prettier-plugin-java":"~1.0.2","@ionic/prettier-config":"~1.0.1","@ionic/swiftlint-config":"^1.1.2"},"peerDependencies":{"@capacitor/core":">=7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/keyboard_7.0.4_1769174662390_0.29164031322249584","host":"s3://npm-registry-packages-npm-production"}},"7.0.5":{"name":"@cantoo/keyboard","version":"7.0.5","description":"The Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Ionic","email":"hi@ionicframework.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/cantoo-scribe/capacitor-keyboard.git"},"bugs":{"url":"https://github.com/cantoo-scribe/capacitor-keyboard/issues"},"keywords":["capacitor","plugin","native"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"xcodebuild build -scheme CapacitorKeyboard -destination generic/platform=iOS","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java","swiftlint":"node-swiftlint","docgen":"docgen --api KeyboardPlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","prepublishOnly":"npm run build","publish:cocoapod":"pod trunk push ./CantooKeyboard.podspec --allow-warnings"},"devDependencies":{"@capacitor/android":"^7.0.0","@capacitor/cli":"^7.0.0","@capacitor/core":"^7.0.0","@capacitor/docgen":"^0.3.0","@capacitor/ios":"^7.0.0","@ionic/eslint-config":"^0.4.0","@ionic/prettier-config":"^4.0.0","@ionic/swiftlint-config":"^2.0.0","@semantic-release/changelog":"^6.0.3","@semantic-release/exec":"^7.1.0","@semantic-release/git":"^10.0.1","@semantic-release/github":"^12.0.2","@semantic-release/npm":"^13.1.2","@types/node":"^24.10.1","eslint":"^8.57.0","prettier":"^3.7.0","prettier-plugin-java":"^2.7.7","rimraf":"^6.1.2","rollup":"^4.53.3","semantic-release":"^25.0.2","swiftlint":"^2.0.0","typescript":"^5.9.3"},"peerDependencies":{"@capacitor/core":">=7.0.0"},"prettier":"@ionic/prettier-config","swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"a22311ad8647f56c736bcc8b8049706d202ff00b","_id":"@cantoo/keyboard@7.0.5","homepage":"https://github.com/cantoo-scribe/capacitor-keyboard#readme","_nodeVersion":"22.19.0","_npmVersion":"11.15.0","dist":{"integrity":"sha512-8WfZLQotBqXULy1M8B+O4q642XYd9+wB4FhgrrtMFadTpk09RwusMyq2zZdzRde8KOkd4CjrEvCShVUPdjQ/Cg==","shasum":"e3f465b602609ec2a80c1df69d0d15496d5ebff3","tarball":"https://registry.npmjs.org/@cantoo/keyboard/-/keyboard-7.0.5.tgz","fileCount":25,"unpackedSize":95664,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDMi7E7yvBJ63SNWGQVhh5QvMVZVWAoaWJx4eyubm45dwIhAKfc3V1tOsqm/+BGlOTqGvAJVDB9avlfpGZenhWpTiSa"}]},"_npmUser":{"name":"sharcoux","email":"f.billioud@gmail.com"},"directories":{},"maintainers":[{"name":"sharcoux","email":"f.billioud@gmail.com"},{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},{"name":"matheusrdsantos","email":"matheus.r.d.s10@hotmail.com"},{"name":"gabrielnsd","email":"gabrielnsdantas@gmail.com"},{"name":"felipecantoo","email":"felipe@cantoo.fr"},{"name":"nicodemos234","email":"nicodemos54324@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/keyboard_7.0.5_1784126411248_0.8953295304345594"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-23T13:24:22.254Z","modified":"2026-07-15T14:40:11.659Z","7.0.4":"2026-01-23T13:24:22.536Z","7.0.5":"2026-07-15T14:40:11.445Z"},"bugs":{"url":"https://github.com/cantoo-scribe/capacitor-keyboard/issues"},"author":{"name":"Ionic","email":"hi@ionicframework.com"},"license":"MIT","homepage":"https://github.com/cantoo-scribe/capacitor-keyboard#readme","keywords":["capacitor","plugin","native"],"repository":{"type":"git","url":"git+https://github.com/cantoo-scribe/capacitor-keyboard.git"},"description":"The Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.","maintainers":[{"name":"sharcoux","email":"f.billioud@gmail.com"},{"name":"ribeirofmatheus","email":"matheus_f.ribeiro@hotmail.com"},{"name":"matheusrdsantos","email":"matheus.r.d.s10@hotmail.com"},{"name":"gabrielnsd","email":"gabrielnsdantas@gmail.com"},{"name":"felipecantoo","email":"felipe@cantoo.fr"},{"name":"nicodemos234","email":"nicodemos54324@gmail.com"}],"readme":"# @capacitor/keyboard\n\nThe Keyboard API provides keyboard display and visibility control, along with event tracking when the keyboard shows and hides.\n\n## Install\n\n```bash\nnpm install @capacitor/keyboard\nnpx cap sync\n```\n\n## Example\n\n```typescript\nimport { Keyboard } from '@capacitor/keyboard';\n\nKeyboard.addListener('keyboardWillShow', info => {\n  console.log('keyboard will show with height:', info.keyboardHeight);\n});\n\nKeyboard.addListener('keyboardDidShow', info => {\n  console.log('keyboard did show with height:', info.keyboardHeight);\n});\n\nKeyboard.addListener('keyboardWillHide', () => {\n  console.log('keyboard will hide');\n});\n\nKeyboard.addListener('keyboardDidHide', () => {\n  console.log('keyboard did hide');\n});\n```\n\n## Configuration\n\nThe keyboard can be configured with the following options:\n\n| Prop                     | Type                                                      | Description                                                                                                                                                                                                                                                                                                       | Default             | Since |\n| ------------------------ | --------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------- | ----- |\n| **`resize`**             | <code><a href=\"#keyboardresize\">KeyboardResize</a></code> | Configure the way the app is resized when the Keyboard appears. Only available on iOS.                                                                                                                                                                                                                            | <code>native</code> | 1.0.0 |\n| **`style`**              | <code><a href=\"#keyboardstyle\">KeyboardStyle</a></code>   | Override the keyboard style if your app doesn't support dark/light theme changes. If not set, the keyboard style will depend on the device appearance. Only available on iOS.                                                                                                                                     |                     | 1.0.0 |\n| **`resizeOnFullScreen`** | <code>boolean</code>                                      | There is an Android bug that prevents the keyboard from resizing the WebView when the app is in full screen (i.e. if StatusBar plugin is used to overlay the status bar). This setting, if set to true, add a workaround that resizes the WebView even when the app is in full screen. Only available for Android |                     | 1.1.0 |\n| **`autoBackdropColor`**  | <code>'off' \\| 'auto' \\| 'dom'</code>                     | Controls how the keyboard backdrop color (the area visible behind the keyboard) is set every time the keyboard is about to show. `'off'` — Do not tint the backdrop. `'auto'` — Use the `backgroundColor` set in the Capacitor config; otherwise derive the color from the web app's DOM body background. `'dom'` — Always derive the color from the web app's DOM body background, ignoring the `backgroundColor` config. If the DOM has no resolvable background, the backdrop is left untouched. Only available on iOS. | <code>\"off\"</code>  | 8.0.4 |\n\n### Examples\n\nIn `capacitor.config.json`:\n\n```json\n{\n  \"plugins\": {\n    \"Keyboard\": {\n      \"resize\": \"body\",\n      \"style\": \"DARK\",\n      \"resizeOnFullScreen\": true,\n      \"autoBackdropColor\": \"auto\"\n    }\n  }\n}\n```\n\nIn `capacitor.config.ts`:\n\n```ts\n/// <reference types=\"@capacitor/keyboard\" />\n\nimport { CapacitorConfig } from '@capacitor/cli';\nimport { KeyboardResize, KeyboardStyle } from '@capacitor/keyboard';\n\nconst config: CapacitorConfig = {\n  plugins: {\n    Keyboard: {\n      resize: KeyboardResize.Body,\n      style: KeyboardStyle.Dark,\n      resizeOnFullScreen: true,\n      autoBackdropColor: 'auto'\n    },\n  },\n};\n\nexport default config;\n```\n\n## Compatibility with `cordova-plugin-ionic-keyboard`\n\nTo maintain compatibility with\n[`cordova-plugin-ionic-keyboard`](https://github.com/ionic-team/cordova-plugin-ionic-keyboard),\nthe following events also work with `window.addEventListener`:\n\n- `keyboardWillShow`\n- `keyboardDidShow`\n- `keyboardWillHide`\n- `keyboardDidHide`\n\n## API\n\n<docgen-index>\n\n* [`show()`](#show)\n* [`hide()`](#hide)\n* [`setAccessoryBarVisible(...)`](#setaccessorybarvisible)\n* [`setScroll(...)`](#setscroll)\n* [`setStyle(...)`](#setstyle)\n* [`setResizeMode(...)`](#setresizemode)\n* [`getResizeMode()`](#getresizemode)\n* [`addListener('keyboardWillShow', ...)`](#addlistenerkeyboardwillshow-)\n* [`addListener('keyboardDidShow', ...)`](#addlistenerkeyboarddidshow-)\n* [`addListener('keyboardWillHide', ...)`](#addlistenerkeyboardwillhide-)\n* [`addListener('keyboardDidHide', ...)`](#addlistenerkeyboarddidhide-)\n* [`removeAllListeners()`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Enums](#enums)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### show()\n\n```typescript\nshow() => Promise<void>\n```\n\nShow the keyboard.\n\nThis method is only supported on Android.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### hide()\n\n```typescript\nhide() => Promise<void>\n```\n\nHide the keyboard.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setAccessoryBarVisible(...)\n\n```typescript\nsetAccessoryBarVisible(options: { isVisible: boolean; }) => Promise<void>\n```\n\nSet whether the accessory bar should be visible on the keyboard. We recommend disabling\nthe accessory bar for short forms (login, signup, etc.) to provide a cleaner UI.\n\nThis method is only supported on iPhone devices.\n\n| Param         | Type                                 |\n| ------------- | ------------------------------------ |\n| **`options`** | <code>{ isVisible: boolean; }</code> |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setScroll(...)\n\n```typescript\nsetScroll(options: { isDisabled: boolean; }) => Promise<void>\n```\n\nProgrammatically enable or disable the WebView scroll.\n\nThis method is only supported on iOS.\n\n| Param         | Type                                  |\n| ------------- | ------------------------------------- |\n| **`options`** | <code>{ isDisabled: boolean; }</code> |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setStyle(...)\n\n```typescript\nsetStyle(options: KeyboardStyleOptions) => Promise<void>\n```\n\nProgrammatically set the keyboard style.\n\nThis method is only supported on iOS.\n\n| Param         | Type                                                                  |\n| ------------- | --------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#keyboardstyleoptions\">KeyboardStyleOptions</a></code> |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### setResizeMode(...)\n\n```typescript\nsetResizeMode(options: KeyboardResizeOptions) => Promise<void>\n```\n\nProgrammatically set the resize mode.\n\nThis method is only supported on iOS.\n\n| Param         | Type                                                                    |\n| ------------- | ----------------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#keyboardresizeoptions\">KeyboardResizeOptions</a></code> |\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### getResizeMode()\n\n```typescript\ngetResizeMode() => Promise<KeyboardResizeOptions>\n```\n\nGet the currently set resize mode.\n\nThis method is only supported on iOS.\n\n**Returns:** <code>Promise&lt;<a href=\"#keyboardresizeoptions\">KeyboardResizeOptions</a>&gt;</code>\n\n**Since:** 4.0.0\n\n--------------------\n\n\n### addListener('keyboardWillShow', ...)\n\n```typescript\naddListener(eventName: 'keyboardWillShow', listenerFunc: (info: KeyboardInfo) => void) => Promise<PluginListenerHandle>\n```\n\nListen for when the keyboard is about to be shown.\n\nOn Android keyboardWillShow and keyboardDidShow fire almost at the same time.\n\n| Param              | Type                                                                     |\n| ------------------ | ------------------------------------------------------------------------ |\n| **`eventName`**    | <code>'keyboardWillShow'</code>                                          |\n| **`listenerFunc`** | <code>(info: <a href=\"#keyboardinfo\">KeyboardInfo</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### addListener('keyboardDidShow', ...)\n\n```typescript\naddListener(eventName: 'keyboardDidShow', listenerFunc: (info: KeyboardInfo) => void) => Promise<PluginListenerHandle>\n```\n\nListen for when the keyboard is shown.\n\nOn Android keyboardWillShow and keyboardDidShow fire almost at the same time.\n\n| Param              | Type                                                                     |\n| ------------------ | ------------------------------------------------------------------------ |\n| **`eventName`**    | <code>'keyboardDidShow'</code>                                           |\n| **`listenerFunc`** | <code>(info: <a href=\"#keyboardinfo\">KeyboardInfo</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### addListener('keyboardWillHide', ...)\n\n```typescript\naddListener(eventName: 'keyboardWillHide', listenerFunc: () => void) => Promise<PluginListenerHandle>\n```\n\nListen for when the keyboard is about to be hidden.\n\nOn Android keyboardWillHide and keyboardDidHide fire almost at the same time.\n\n| Param              | Type                            |\n| ------------------ | ------------------------------- |\n| **`eventName`**    | <code>'keyboardWillHide'</code> |\n| **`listenerFunc`** | <code>() =&gt; void</code>      |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### addListener('keyboardDidHide', ...)\n\n```typescript\naddListener(eventName: 'keyboardDidHide', listenerFunc: () => void) => Promise<PluginListenerHandle>\n```\n\nListen for when the keyboard is hidden.\n\nOn Android keyboardWillHide and keyboardDidHide fire almost at the same time.\n\n| Param              | Type                           |\n| ------------------ | ------------------------------ |\n| **`eventName`**    | <code>'keyboardDidHide'</code> |\n| **`listenerFunc`** | <code>() =&gt; void</code>     |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() => Promise<void>\n```\n\nRemove all native listeners for this plugin.\n\n**Since:** 1.0.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### KeyboardStyleOptions\n\n| Prop        | Type                                                    | Description            | Default                            | Since |\n| ----------- | ------------------------------------------------------- | ---------------------- | ---------------------------------- | ----- |\n| **`style`** | <code><a href=\"#keyboardstyle\">KeyboardStyle</a></code> | Style of the keyboard. | <code>KeyboardStyle.Default</code> | 1.0.0 |\n\n\n#### KeyboardResizeOptions\n\n| Prop       | Type                                                      | Description                                             | Since |\n| ---------- | --------------------------------------------------------- | ------------------------------------------------------- | ----- |\n| **`mode`** | <code><a href=\"#keyboardresize\">KeyboardResize</a></code> | Mode used to resize elements when the keyboard appears. | 1.0.0 |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n\n#### KeyboardInfo\n\n| Prop                 | Type                | Description             | Since |\n| -------------------- | ------------------- | ----------------------- | ----- |\n| **`keyboardHeight`** | <code>number</code> | Height of the keyboard. | 1.0.0 |\n\n\n### Enums\n\n\n#### KeyboardStyle\n\n| Members       | Value                  | Description                                                                                                                                                                       | Since |\n| ------------- | ---------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`Dark`**    | <code>'DARK'</code>    | Dark keyboard.                                                                                                                                                                    | 1.0.0 |\n| **`Light`**   | <code>'LIGHT'</code>   | Light keyboard.                                                                                                                                                                   | 1.0.0 |\n| **`Default`** | <code>'DEFAULT'</code> | The keyboard style is based on the device appearance. If the device is using Dark mode, the keyboard will be dark. If the device is using Light mode, the keyboard will be light. | 1.0.0 |\n\n\n#### KeyboardResize\n\n| Members      | Value                 | Description                                                                                                          | Since |\n| ------------ | --------------------- | -------------------------------------------------------------------------------------------------------------------- | ----- |\n| **`Body`**   | <code>'body'</code>   | Only the `body` HTML element will be resized. Relative units are not affected, because the viewport does not change. | 1.0.0 |\n| **`Ionic`**  | <code>'ionic'</code>  | Only the `ion-app` HTML element will be resized. Use it only for Ionic Framework apps.                               | 1.0.0 |\n| **`Native`** | <code>'native'</code> | The whole native Web View will be resized when the keyboard shows/hides. This affects the `vh` relative unit.        | 1.0.0 |\n| **`None`**   | <code>'none'</code>   | Neither the app nor the Web View are resized.                                                                        | 1.0.0 |\n\n</docgen-api>\n","readmeFilename":"README.md"}