# Migrate from react-native-swipe-list-view

> Switch from react-native-swipe-list-view to Patine UI's SwipeableRow: swipe actions as data instead of a hidden row you lay out, full swipe to delete, one open row at a time, and actions screen readers and keyboards can reach.

# Migrate from `react-native-swipe-list-view`

```diff
- import { SwipeListView } from 'react-native-swipe-list-view';
+ import { List, ListItem, SwipeableRow } from 'patine-ui';

- <SwipeListView
-   data={mail}
-   renderItem={({ item }) => <MailRow mail={item} />}
-   renderHiddenItem={({ item }) => <HiddenDeleteButton onPress={() => remove(item.id)} />}
-   rightOpenValue={-75}
-   closeOnRowOpen
- />
+ <List>
+   {mail.map((item) => (
+     <SwipeableRow key={item.id} fullSwipe trailingActions={[{ label: 'Delete', variant: 'destructive', onPress: () => remove(item.id) }]}>
+       <ListItem title={item.subject} />
+     </SwipeableRow>
+   ))}
+ </List>
```

| react-native-swipe-list-view | Patine UI |
| --- | --- |
| `renderHiddenItem` | `leadingActions` / `trailingActions`: `{ label, icon?, variant?, color?, onPress }[]` |
| `rightOpenValue` / `leftOpenValue` | the actions' width (74–88pt each, by design) |
| `closeOnRowOpen` | always: opening a row closes the others |
| `closeOnRowPress` | always: tapping an open row closes it |
| `rightActivationValue` + `onRightAction` | `fullSwipe`: a long swipe runs the edge action |
| `disableRightSwipe` / `disableLeftSwipe` | leave that side's actions out |
| `onRowOpen` / `onRowClose` | `onOpenChange(side \| null)` |
| `SwipeRow` | `SwipeableRow` |

Wrap rows in any list you use, a `FlatList` included. Screen readers reach the actions without swiping, and on the web the arrow keys open a focused row.

See [all migration guides](./index.mdx) for other libraries, and [Comparison](../comparison.mdx) for when another library is the better choice.
