{"id":4155,"url":"https://github.com/ardaogulcan/react-native-keyboard-accessory","last_synced_at":"2025-08-04T00:32:24.660Z","repository":{"id":37451249,"uuid":"100930659","full_name":"ardaogulcan/react-native-keyboard-accessory","owner":"ardaogulcan","description":"A React Native Keyboard Accessory (View, Navigation) Component. Sticky views on keyboard.","archived":false,"fork":false,"pushed_at":"2023-08-16T06:19:20.000Z","size":878,"stargazers_count":540,"open_issues_count":41,"forks_count":64,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-07-31T11:21:09.225Z","etag":null,"topics":["input-accessory","keyboard-accessory","react","react-native","sticky-views"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ardaogulcan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-21T08:30:34.000Z","updated_at":"2025-07-24T21:45:50.000Z","dependencies_parsed_at":"2024-01-08T01:02:08.518Z","dependency_job_id":"4ab2a98b-354c-43bd-83e3-0743f639b71a","html_url":"https://github.com/ardaogulcan/react-native-keyboard-accessory","commit_stats":{"total_commits":83,"total_committers":15,"mean_commits":5.533333333333333,"dds":"0.27710843373493976","last_synced_commit":"d5f09f121adf7b5ceb78ea6f9ec6a16ab40b6d62"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/ardaogulcan/react-native-keyboard-accessory","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardaogulcan%2Freact-native-keyboard-accessory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardaogulcan%2Freact-native-keyboard-accessory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardaogulcan%2Freact-native-keyboard-accessory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardaogulcan%2Freact-native-keyboard-accessory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ardaogulcan","download_url":"https://codeload.github.com/ardaogulcan/react-native-keyboard-accessory/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ardaogulcan%2Freact-native-keyboard-accessory/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268634063,"owners_count":24281895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["input-accessory","keyboard-accessory","react","react-native","sticky-views"],"created_at":"2024-01-05T20:17:02.803Z","updated_at":"2025-08-04T00:32:23.862Z","avatar_url":"https://github.com/ardaogulcan.png","language":"JavaScript","funding_links":[],"categories":["Components","JavaScript","Others"],"sub_categories":["UI"],"readme":"# react-native-keyboard-accessory\n\n[![npm version](https://img.shields.io/npm/v/react-native-keyboard-accessory.svg)](https://www.npmjs.com/package/react-native-keyboard-accessory)\n[![npm total downloads](https://img.shields.io/npm/dt/react-native-keyboard-accessory.svg)](https://www.npmjs.com/package/react-native-keyboard-accessory)\n[![npm weekly downloads](https://img.shields.io/npm/dw/react-native-keyboard-accessory.svg)](https://www.npmjs.com/package/react-native-keyboard-accessory)\n\nA React Native Keyboard Accessory (View, Navigation) Component. Sticky views on keyboard.\n\n![IOS View Example](https://media.giphy.com/media/ZFh86727hAbAc/giphy.gif)  ![IOS Navigation Example](https://media.giphy.com/media/NYsR2BtQaUaQw/giphy.gif)\n\n**Expo Snack Playground**\n\nhttps://snack.expo.io/@ardaogulcan/react-native-keyboard-accessory-playground\n\n## Installation\n\nVia npm:\n\n```shell\nnpm install react-native-keyboard-accessory --save\n```\n\nVia Yarn:\n\n```shell\nyarn add react-native-keyboard-accessory\n```\n\n## Usage\n\nYou can use the ``KeyboardAccessoryView`` or the ``KeyboardAccessoryNavigation``\ncomponents.\n\n### Keyboard Accessory View\n\nImport `react-native-keyboard-accessory`\n\n```js\nimport { KeyboardAccessoryView } from 'react-native-keyboard-accessory'\n\n```\n\nUse it inside your `render()` function:\n\n```jsx\n\u003cKeyboardAccessoryView\u003e\n  \u003cView\u003e\n    \u003cTextInput /\u003e\n  \u003c/View\u003e\n\u003c/KeyboardAccessoryView\u003e\n```\n\n***Important:*** KeyboardAccessoryView should be positioned inside the Root Element which is covering the screen, mostly the top most view styled as ``{ flex: 1 }``.\n\n#### Render Prop\n\nAlternatively, you can also pass a function as the `children` prop of the component. This allows you to access an `isKeyboardVisible` prop which is useful to render things conditionally based on the visibility of the keyboard:\n\n```jsx\n\u003cKeyboardAccessoryView\u003e\n  {({ isKeyboardVisible }) =\u003e {\n    return (\n      \u003c\u003e\n        \u003cText\u003eAlways visible\u003c/Text\u003e\n        {!isKeyboardVisible ? (\n          \u003cText\u003eHidden when keyboard is visible\u003c/Text\u003e\n        ) : null}\n      \u003c/\u003e\n    );\n  }}\n\u003c/KeyboardAccessoryView\u003e\n```\n\n### Keyboard Accessory Navigation\nImport ``react-native-keyboard-accessory``\n\n```js\nimport { KeyboardAccessoryNavigation } from 'react-native-keyboard-accessory'\n\n```\nAnd use it inside your ``render()`` function:\n\n```jsx\n\u003cKeyboardAccessoryNavigation /\u003e\n```\n\n***Important:*** KeyboardAccessoryNavigation should be positioned inside the Root Element which is covering the screen, mostly the top most view styled as ``{ flex: 1 }``.\n\n### For Ejected Apps\n\nFor Android, make sure you have set `android:windowSoftInputMode` to `adjustResize` in `android/app/src/main/AndroidManifest.xml`\n\nAnd set `androidAdjustResize` to `true`. For example,\n\n```jsx\n\u003cKeyboardAccessoryView androidAdjustResize /\u003e\n// or\n\u003cKeyboardAccessoryNavigation androidAdjustResize /\u003e\n```\n\n### To maintain KeyboardAvoidingView behavior\n```jsx\n\u003cKeyboardAccessoryNavigation avoidKeyboard /\u003e\n```\n\n## API\n\n### *KeyboardAccessoryView*\n\n| **Prop** | **Type** | **Default** | **Description** |\n|----------|----------|-------------|-----------------|\n| `style` | `object` | `null` | Style `object` or `StyleSheet` reference which will be applied to Accessory `View` |\n| `animateOn` | `enum:string` | `'ios'` | Enables show/hide animation on given platform. Values: `['ios', 'android', 'all', 'none']`. |\n| `animationConfig` | `function` or `object` | `null` | For passing custom animations to show/hide. If given prop is function, `duration` and `easing` parameters from `Keyboard` event will be passed to the function, function should return `LayoutAnimation` compatible animation config. Or you can directly pass animation config object. |\n| `alwaysVisible` | `boolean` | `false` | When set to `true` Accessory View will be always visible at the bottom of the screen. Good for sticky `TextInput`'s |\n| `bumperHeight` | `number` | 15 | Bumper height to prevent visual glitches if animation couldn't keep up with the keyboard animation. |\n| `visibleOpacity` | `number` | 1 | Opacity of the Accessory when it is visible. *Note:* Opacity is used for hiding the accessory to prevent render delays. |\n| `heightProperty` | `enum:string` | `height` | Control how the component manages its height. The component listens for children changes and automatically adjusts its height, so `height` is usually sufficient. For use with a multiline, autogrowing `TextInput`, `minHeight` is recommended. Values: `['height', 'minHeight']` |\n| `hiddenOpacity` | `number` | 0 | Opacity of the Accessory when it is hidden. |\n| `hideBorder` | `boolean` | false | Set true if you want to hide top border of the Accessory |\n| `inSafeAreaView` | `boolean` | false | Set true if you want to adapt SafeAreaView on iPhone X |\n| `androidAdjustResize` | `boolean` | false | Set true in ejected apps to adjust resize |\n| `avoidKeyboard` | `boolean` | false | Set true if you want accessory to maintain KeyboardAvoidingView behavior. You shouldn't use any other Keyboard Avoiding library when you set this to `true` |\n\n### *KeyboardAccessoryNavigation*\n\nAll the `KeyboardAccessoryView` props will be passed.\n\n| **Prop** | **Type** | **Default** | **Description** |\n|----------|----------|-------------|-----------------|\n| `doneButtonTitle` | `string` | `'Done'` | Title text to show on the right Button of Navigation View |\n| `tintColor` | `string` | `'#007AFF'` | Tint color for the arrows and done button |\n| `doneButton` | `node` | `null` | Replace default Done Button. Non-Touchable node should be provided. |\n| `nextButton` | `node` | `null` | Replace default Next Button. Non-Touchable node should be provided. |\n| `previousButton` | `node` | `null` | Replace default Previous Button. Non-Touchable node should be provided. |\n| `doneDisabled` | `boolean` | false | Disables Done Button |\n| `nextDisabled` | `boolean` | false | Disables Next Button |\n| `previousDisabled` | `boolean` | false | Disables Previous Button |\n| `doneHidden` | `boolean` | false | Hides Done Button |\n| `nextHidden` | `boolean` | false | Hides Next Button |\n| `previousHidden` | `boolean` | false | Hides Previous Button |\n| `accessoryStyle` | `object` | null | Style object or StyleSheet reference which will be applied to Navigation Accessory `View`. |\n| `doneButtonStyle` | `object` | null | Style object or StyleSheet reference which will be applied to Done Button `View` |\n| `doneButtonTitleStyle` | `object` | null | Style object or StyleSheet reference which will be applied to Done Button `Text` |\n| `doneButtonHitslop` | `Insets` | { left: 0, top: 0, right: 0, bottom: 0 } | This defines how far your touch can start away from the doneButton |\n| `previousButtonStyle` | `object` | 0 | Style object or StyleSheet reference which will be applied to Previous Button `View` |\n| `nextButtonStyle` | `object` | 0 | Style object or StyleSheet reference which will be applied to Next Button `View` |\n| `nextButtonDirection` | `enum:string` | `'down'` | Arrow direction for the Next Button. Values: `['down', 'up', 'right', 'left']`. |\n| `nextButtonHitslop` | `Insets` | { left: 0, top: 0, right: 0, bottom: 0 } | This defines how far your touch can start away from the nextButton |\n| `previousButtonDirection` | `enum:string` | `'up'` | Arrow direction for the Previous Button. Values: `['down', 'up', 'right', 'left']`. |\n| `previousButtonHitslop` | `Insets` | { left: 0, top: 0, right: 0, bottom: 0 } | This defines how far your touch can start away from the previousButton |\n| `onDone` | `function` | null | Triggered on Done Button `press` |\n| `onNext` | `function` | null | Triggered on Next Button `press` |\n| `onPrevious` | `function` | null | Triggered on Previous Button `press` |\n\n### *KeyboardAwareTabBarComponent*\n\n| **Prop** | **Type** | **Default** | **Description** |\n|----------|----------|-------------|-----------------|\n| `TabBarComponent` | `node`, `function` |  | Provide TabBarComponent to render. Usually from `react-navigation` |\n\n  ## Known Issues\n\n  - Accessory doesn't follow keyboard when closed with drag gesture.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardaogulcan%2Freact-native-keyboard-accessory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fardaogulcan%2Freact-native-keyboard-accessory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fardaogulcan%2Freact-native-keyboard-accessory/lists"}