# Haptics

> When a Raft app vibrates, which of the 4 haptic tiers it plays, on which frame, and the moments that never vibrate, on iOS, Android and the web.

Source: https://raft-design.botiverse.build/foundations/haptics. Generated from the current release; where it differs from what you remember, this page is right.

A vibration in Raft means one thing: something took effect. A long press was recognized, an action worked, a gesture passed its trigger, or a drag moved one step. Plain taps, sending, scrolling, and navigation stay silent, so people can trust a vibration when they feel one. Every vibration is one of 4 tiers, played with the platform's own feedback on the frame the screen settles into its new state.

The mobile app plays the tiers through `RaftHaptics`. The web plays only 2 `threshold` cases, on Android browsers ([Platforms](#platforms)). The rules follow the mobile app's haptics plan, approved by Artea on 2026-12-02 (#proj-mobile:#467, #proj-mobile:bed33cf8), which keeps the restraint artin set for `RaftHaptics` (#proj-mobile:#50).

## Principles

- **Vibrate only at the moment something takes effect.** One vibration means "it opened", "it worked", "it passed the trigger" or "it moved one step". A vibration on every tap would turn into noise, and then the one that matters would go unnoticed.
- **4 tiers, and no others.** Every vibration is `longPress`, `threshold`, `tick`, or `result` ([The four tiers](#the-four-tiers)). A new case picks one of these by its meaning; don't add a fifth tier or a pattern of your own.
- **On the frame that settles the screen.** The vibration lands on the same frame as the animation that shows the new state, never later, when the finger lets go ([Timing](#timing)).
- **Use the platform's feedback.** Play each tier with the system's own feedback API, never a custom vibration pattern, so Raft feels like the rest of the phone and someone who turned haptics off feels nothing ([Platforms](#platforms)).
- **The screen always says it too.** A vibration repeats what the screen shows; it never carries information alone ([Accessibility](#accessibility)).

## The four tiers

| Tier | Meaning | Examples |
| --- | --- | --- |
| `longPress` | A long press is recognized, and something lifts or opens. | A message's menu opening; an item lifting to be reordered. |
| `threshold` | A gesture passes its trigger point. | A row swiped past the point where it acts; a pull passing the point where it refreshes; holding to dictate, when the recording starts and ends. |
| `tick` | A drag moves one slot or one step. Also the 3 decided taps: a switch on iOS, a reaction, and a task checked done. | A reordered item passing the next slot; a stepped slider snapping to the next step; a wheel picker moving to the next option. |
| `result` | An action whose outcome can't be seen, or comes back later, succeeded or failed: `result(true)` or `result(false)`. | Copying to the clipboard; a message refused by the server after the finger has lifted. |

- Play `threshold` on the frame the gesture crosses its trigger point, not when the finger lifts: the finger has to know before it lets go whether letting go will act.
- Play `threshold` once per crossing, and don't let a finger that moves back and forth on the line buzz again and again. In the mobile app the gesture keeps a small dead zone around the trigger point (hysteresis), and only a move clearly back out of it disarms the gesture. Where a gesture can be taken back, as a pull on Android or a swipe on a row can, crossing again after it was disarmed arms it again and plays `threshold` again. Where it latches, as a pull on iOS does ([Navigation](https://raft-design.botiverse.build/patterns/navigation.md#refreshing)), it plays once. On the web, the pull and the swipe arm and disarm at the line itself ([PullToRefresh](https://raft-design.botiverse.build/components/pull-to-refresh.md#on-android)).
- Play `tick` once for each slot or step the drag enters, and nothing between steps or on release. A drag fast enough to cross several slots in one frame plays 1 tick, so a cheap motor doesn't blur them into one long buzz.
- Play `tick` for something dragged, and for a tap only in the 3 decided cases in [Where Raft vibrates](#where-raft-vibrates). Any other discrete control that is only tapped, such as a playback-speed button, is a plain tap and stays silent: its new value is on screen at once.
- Play `result` only when the outcome can't be seen where the person is looking, or arrives after they lifted their finger: the clipboard doesn't change anything on screen, and a refusal that comes back later finds the person looking elsewhere. An error shown next to the button at once, while the person is still looking at it, doesn't vibrate.

## Timing

The vibration and the animation that settles the screen land on the same frame, so the hand and the eye feel one event.

- Name that frame in the component's doc and in this page's table ([Where Raft vibrates](#where-raft-vibrates)): the frame a menu appears, the frame a swipe's button grows across the row, the frame a pill pops.
- For a result that comes back from the server, the frame is the one that shows the result, not the tap that asked for it.
- With reduced motion, play on the frame the new state appears: the vibration stays when the animation is off.
- On iOS, prepare the feedback generator when a continuous gesture starts (a pull, a swipe, a drag, a slider), so the first `threshold` or `tick` isn't late.

## Where Raft vibrates

This table lists every place Raft vibrates. A surface not in it doesn't vibrate; adding one means adding its row here, with its tier and its frame.

| Component or surface | Tier | Frame |
| --- | --- | --- |
| Copy: press and hold to copy (`RaftCopyable`), or Copy in a menu | `result(true)` | "Copied" appears |
| Press and hold a message, a conversation row, the server tab, or a badge | `longPress` | The menu, sheet, or tooltip appears. Choosing an item in the menu doesn't vibrate again, apart from Copy |
| Reorder a list or the tab bar's places ([Drag and drop](https://raft-design.botiverse.build/patterns/drag-and-drop.md)) | `longPress` on lift, then `tick` | Lift: the lifted copy appears. Tick: the item crosses the next item's midpoint and the others start to move. The drop doesn't vibrate |
| Swipe a row past the 60% point: Done to the left, Read or Unread to the right ([Responsive layout](https://raft-design.botiverse.build/patterns/responsive.md#touch-screens)) | `threshold` | Past the 60% point, the Done button starts to grow across the row, or the Read or Unread button starts to ride the row's edge |
| Pull to refresh ([Navigation](https://raft-design.botiverse.build/patterns/navigation.md#refreshing)) | `threshold` | The indicator turns armed |
| Stepped slider (`RaftSlider` with steps) | `tick` | The thumb snaps to the next step. A continuous slider, such as volume or a video's position, doesn't vibrate |
| Wheel picker (`RaftChoicePicker`) | `tick` | The highlight lands on the next option |
| Switch (`RaftSwitch`), iOS only | `tick` | The knob starts to move. On Android the switch doesn't vibrate ([Switches](#switches)) |
| Tap a reaction | `tick` | The first frame of the emoji pill's pop (Artea, 2026-12-02, #proj-mobile:bed33cf8) |
| Complete a task ([Completing a task](https://raft-design.botiverse.build/patterns/tasks.md#completing-a-task)): its checkbox, or Done in the status menu on the phone, which has no checkbox | `tick` | The first frame of the title's strike-through; from the menu, as the menu closes and the row turns done. Other statuses don't vibrate (Artea, 2026-12-02; menu: Kirby, 2026-12-02, #proj-mobile:bed33cf8) |
| Submit an Action Card ([MessageActionCard](https://raft-design.botiverse.build/components/message-action-card.md)) | `result(true)` | The server confirms and the card turns submitted, not the tap. A failure follows the row for an action refused after the finger has lifted (Artea, 2026-12-02, #proj-mobile:bed33cf8) |
| Hold to dictate | `threshold` | The recording starts, as its waveform appears, and again when it ends, as the waveform stops: eyes aren't on the button while dictating, so the hand needs to know (Artea, 2026-12-02, #proj-mobile:bed33cf8). Both ways of dictating record from the press (a hold under 350ms locks continuous dictation instead), so the start plays in the press's frame, with the waveform; locking plays nothing more. The end plays as the recording stops: releasing a hold, or the tap that stops a locked one. One haptic per start and per end, none for the switch between ways (Kirby, 2026-12-02). Sliding into the cancel or lock zone plays `threshold` as the zone changes color |
| An action refused after the finger has lifted: a message that couldn't be sent, missing permission, a full quota, or a settings form the server refused | `result(false)` | The error appears. An error shown next to the button at once doesn't vibrate |
| An agent's migration confirmed by the server | `result(true)` | The confirmation appears |

### Switches

A switch follows each platform's own switch. On iOS the system switch ticks when it flips, and people who use it every day feel a silent switch as fake, so Raft's switch plays `tick` there. On Android, Material's switch doesn't vibrate, and neither does Raft's. Checkboxes and radios don't vibrate on either platform: their new state is on screen at once. Checking a task done is the one checkbox that ticks, because it finishes a piece of work; choosing Done in the phone's status menu ticks the same way, being the same act (Kirby, 2026-11-29; Artea, 2026-12-02, #proj-mobile:bed33cf8).

## Never vibrate

- Plain taps on buttons, rows, and links, apart from the 3 decided taps in [Where Raft vibrates](#where-raft-vibrates); sending a message; scrolling a page or a list; switching tabs. These are the most frequent things people do, and their result is on screen.
- Going back by swiping from the edge, and any other navigation. The system's own back swipe doesn't vibrate, and it is one of the gestures people make most.
- A sheet snapping between its heights. The sheet's height is on screen, and the system's sheets don't vibrate either.
- A discrete control that is only tapped, such as a playback-speed button.
- Menu items, apart from Copy. Saving, marking unread, and the rest show their result in place or in a toast.
- Form validation while the person types. A failure buzz must never hurry or scold someone who is still typing; only a submit refused later plays `result(false)`.
- A new message arriving while the app is in the foreground. Getting someone's attention is a notification's job, and a person reading shouldn't be interrupted.
- Checkboxes and radios on every platform, and switches on Android ([Switches](#switches)).

## Platforms

| Tier | iOS | Android |
| --- | --- | --- |
| `longPress` | `UIImpactFeedbackGenerator`, `.medium` | `HapticFeedbackConstants.LONG_PRESS` |
| `threshold` | `UIImpactFeedbackGenerator`, `.light` | `GESTURE_THRESHOLD_ACTIVATE` from API 34; `CONTEXT_CLICK` below |
| `tick` | `UISelectionFeedbackGenerator` | `SEGMENT_TICK` from API 34; `CLOCK_TICK` below |
| `result` | `UINotificationFeedbackGenerator`, `.success` or `.error` | `CONFIRM` or `REJECT` from API 30; `CONTEXT_CLICK` or `LONG_PRESS` below |

- In the mobile app, call `RaftHaptics`, never the platform API directly, so every screen plays the same tier the same way.
- Let the design system's gesture components play `threshold` for a swipe on a row and a pull to refresh, not each page, so a new page that uses them vibrates the same way.
- The desktop app never vibrates.
- On the web, only Android browsers can vibrate, and the web plays only the 2 `threshold` cases it has: a pull to refresh passing its threshold ([PullToRefresh](https://raft-design.botiverse.build/components/pull-to-refresh.md#on-android)) and a row swiped past the 60% point ([Responsive layout](https://raft-design.botiverse.build/patterns/responsive.md#touch-screens)). Both are a 10ms vibration, `navigator.vibrate(10)`. Don't add others on the web.

## Accessibility

- Respect the system setting. In the apps, someone who turned off haptics or touch feedback on their phone feels nothing from Raft: the platform APIs above follow that setting, so never work around it. On the web, the browser decides, and a page can't read the setting.
- Never let a vibration carry information alone. Every vibration in [Where Raft vibrates](#where-raft-vibrates) repeats something the screen shows: the menu that opened, the armed indicator, "Copied", the error. Someone who feels nothing, on a device with no motor or with haptics off, misses nothing ([Accessibility](https://raft-design.botiverse.build/foundations/accessibility.md#principles)).

## Related

- [Motion](https://raft-design.botiverse.build/foundations/motion.md): the animations a vibration lands with.
- [Navigation](https://raft-design.botiverse.build/patterns/navigation.md#refreshing): pull to refresh on each platform.
- [Responsive layout](https://raft-design.botiverse.build/patterns/responsive.md#touch-screens): swiping a row to show its actions.
- [Drag and drop](https://raft-design.botiverse.build/patterns/drag-and-drop.md): lifting and reordering.
- [Accessibility](https://raft-design.botiverse.build/foundations/accessibility.md): meaning never depends on one sense.
