---
title: "iOS Keyboard"
description: "The iOS 26 keyboard for a phone mockup: the predictive bar, letter keys that pop as the text grows, and automatic shift, in light and dark."
url: https://gelatinui.com/components/ios-keyboard
markdown_url: https://gelatinui.com/components/ios-keyboard.md
access: free
install: "npx shadcn@latest add @gelatin-ui/ios-keyboard"
registry_item: https://gelatinui.com/r/ios-keyboard.json
version: "2026-11-11"
index: https://gelatinui.com/llms.txt
docs_index: https://gelatinui.com/docs/llms.txt
---

# iOS Keyboard

> The iOS 26 keyboard for a phone mockup: the predictive bar, letter keys that pop as the text grows, and automatic shift, in light and dark.

Page: https://gelatinui.com/components/ios-keyboard

## When to use it

Best for: The iOS keyboard at the foot of an iPhone mockup screen, under a field or a composer.

- Pass the field text to `typed`: each new character pops its key, and a shorter text presses delete.
- Pass `suggestions` for the predictive bar: the word as typed in quotes, then two words.
- Use `appearance="dark"` or `"light"` when the app differs from the page theme.

## When not to use it

- To show a shortcut on desktop keys, use [Kbd](https://gelatinui.com/components/kbd.md).

## Notes for agents

- Put it last in the screen column, under the composer. Its corners follow the screen corner of a device frame.
- Shift follows iOS: on for an empty field and after a sentence ends. `shift` forces it.
- `pressed` holds a key down: a letter shows its callout, `shift`, `delete`, `return`, `space`, and `123` darken.
- It is a picture: no key takes input, and screen readers skip it.

## Anatomy

```text
IosKeyboard
```

## API reference

### IosKeyboard

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `appearance` | `"dark" \| "light" \| "system"` |  |  |
| `typed` | `string` | "" | The text typed so far. Each new character pops its key, a shorter text presses delete, and shift follows the iOS capitals: on at the start and after a sentence ends. |
| `shift` | `boolean` |  | Forces shift on or off instead of following the text. |
| `suggestions` | `readonly [string, string, string]` | DEFAULT_SUGGESTIONS | The three words in the predictive bar. Default "I", "The", "I’m". |
| `pressed` | `IosKeyboardKey \| (string & {}) \| null` | null | A key held down: a letter, or `shift`, `delete`, `return`, `space`, `123`. |

## Styling

| Part | Slot | States | CSS variables | Tokens |
| --- | --- | --- | --- | --- |
| IosKeyboard | `ios-keyboard` |  | `--device-screen-radius`, `--ios-keyboard-down`, `--ios-keyboard-faint`, `--ios-keyboard-ink`, `--ios-keyboard-key`, `--ios-keyboard-key-width`, `--ios-keyboard-sheet` |  |

## Usage

Put it at the foot of a phone screen, with the text of the field.

```tsx title="search-screen.tsx"
import { IosKeyboard } from "@/components/mockups/ios-keyboard";

export function SearchScreen({ query }: { query: string }) {
  return (
    <div className="flex h-full flex-col">
      <div className="flex-1">{query}</div>
      <IosKeyboard typed={query} suggestions={["“near”", "nearby", "near me"]} />
    </div>
  );
}
```

## Compose

Rules:

- Compose the parts (`compose-parts`): Build each item from its named parts as children, and pass your text and icons in as parts.
- Every state is designed (`every-state`): Give each view of data its loading, empty, and error states: a skeleton in the final layout, an `Empty` with an illustration and one next action, and an error that says what failed and how to retry.

## Add it

```bash
npx shadcn@latest add @gelatin-ui/ios-keyboard
```

It adds 4 registry items: 3 files, 1118 lines, and the npm packages `tailwind-merge`, `tailwind-variants`.

## For AI agents

- Every item, one file: https://gelatinui.com/llms.txt
- MCP server (`search_items`, `get_item`, `get_install_plan`): https://gelatinui.com/mcp

## Related

- [iPhone](https://gelatinui.com/components/iphone.md)
- [iOS Status Bar](https://gelatinui.com/components/ios-status-bar.md)
- [iOS Messages](https://gelatinui.com/components/ios-messages.md)

## Accessibility

The keyboard is a picture of system UI, hidden from screen readers.

## Motion

| Part | Motion |
| --- | --- |
| Key pop | instant · the key callout shows at once and fades in 60ms after 140ms, so each new character pops its key |
| Special keys | instant · space and delete take the pressed color for 140ms, then fade in 60ms |
