Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Add Swipe & Scroll guide #3254

Merged
merged 3 commits into from
Dec 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/docs/guides/swipe-and-scroll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
id: swipe-and-scroll
title: Swipeable components inside ScrollView (web)
---

## Adding custom swipeable components into `ScrollView`

While we recommend using our own [`ReanimatedSwipeable`](../components/reanimated_swipeable.md) component, creating your own version of swipeable gives you more control over its behavior. Common issue here is that after creating your own swipeable component, scroll does not work. In that case, try adding [`touchAction`](../gestures/gesture-detector.md#touchaction-web-only) set to `"pan-y"`, like this:

```jsx
<GestureDetector gesture={...} ... touchAction="pan-y">
...
</GestureDetector>
```
5 changes: 5 additions & 0 deletions docs/src/css/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,11 @@ code {
border-bottom: 1px solid var(--ifm-font-color-base);
}

.markdown h2 code {
font-size: 22px;
font-weight: 600;
}

/* Sidebar */
[class*='menu__list-item-collapsible'] a {
font-family: var(--swm-title-font);
Expand Down