Skip to content
Open

V10 #465

Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
a07da49
use Pressable instead of TouchableOpacity
ammarahm-ed Oct 11, 2025
c98a453
update dependencies
ammarahm-ed Oct 11, 2025
d50833c
Use react-native-safe-area-insets library to get insets
ammarahm-ed Oct 11, 2025
6d8602e
minor cleanup
ammarahm-ed Oct 11, 2025
fe078ac
enable edgeToEdge in example app
ammarahm-ed Oct 11, 2025
3e5340d
add support for scrolling nodes in with new gesture handler
ammarahm-ed Oct 14, 2025
114a6d4
fix edgeToEdge enabled sheet height
ammarahm-ed Oct 14, 2025
e61e917
feat: migrate to reanimated
ammarahm-ed Oct 15, 2025
39f6258
fix keyboard and onChange, drawUndersStatusbar props
ammarahm-ed Oct 15, 2025
e2ab606
cleanup
ammarahm-ed Oct 15, 2025
2f1a0f3
cleanup
ammarahm-ed Oct 15, 2025
587339b
minor fixes
ammarahm-ed Oct 16, 2025
740e076
fix ios example
ammarahm-ed Oct 16, 2025
fcd3611
release v10.0.0-alpha.1
ammarahm-ed Oct 16, 2025
2ec5de4
minor fixes
ammarahm-ed Oct 16, 2025
1c8581b
fix animation config
ammarahm-ed Oct 16, 2025
fa00e4a
cleanup
ammarahm-ed Oct 16, 2025
2346fda
fix scrollview handling
ammarahm-ed Oct 16, 2025
0ecbc7a
remove FlashList
ammarahm-ed Oct 16, 2025
3dca965
fix router animations
ammarahm-ed Oct 16, 2025
5dfbbfc
fix flatlist and scrollview
ammarahm-ed Oct 31, 2025
ba14b4f
fix: hideAll does not hide all sheets in focus
ammarahm-ed Oct 31, 2025
53f4b0d
mobile: fix scroll inside action sheet
ammarahm-ed Oct 31, 2025
f49a0b9
update snap-me action sheet
ammarahm-ed Oct 31, 2025
7992c7f
fix animated styles glitch
ammarahm-ed Oct 31, 2025
aac4fb6
fix web bugs
ammarahm-ed Oct 31, 2025
d470564
web: use pan responder
ammarahm-ed Nov 1, 2025
ad095de
update expo example
ammarahm-ed Nov 1, 2025
2afee48
feat: initialTranslateFactor prop
ammarahm-ed Nov 1, 2025
53582c0
release alpha.3
ammarahm-ed Nov 1, 2025
e6cabdd
Merge branch 'master' into develop
ammarahm-ed Nov 1, 2025
a8d8938
Update src/types.ts
ammarahm-ed Nov 1, 2025
a9efab2
minor cleanup
ammarahm-ed Nov 1, 2025
2e89253
Merge branch 'master' into develop
ammarahm-ed Nov 1, 2025
c00396d
feat: add SheetRegister component
ammarahm-ed Nov 2, 2025
502af7f
chore: update examples
ammarahm-ed Nov 2, 2025
a3e9e0f
fix crash in useScrollHandlers
ammarahm-ed Nov 4, 2025
edb73de
docs: update
ammarahm-ed Nov 5, 2025
0a01ef4
update examples
ammarahm-ed Nov 5, 2025
bbf1cf6
chore: refactor and bug fix
ammarahm-ed Nov 5, 2025
d1faebc
release: 10.0.0-alpha.5
ammarahm-ed Nov 5, 2025
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
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,5 @@ tsconfig.json
.github/
.prettierrc.js
.eslintrc.js
package-lock.json

7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,13 @@ Check out the [installation](https://rnas.vercel.app/installation) section of ou

Check out our dedicated documentation page for info about this library, it's features, API reference and more: [https://rnas.vercel.app](https://rnas.vercel.app)

## Migrating from v0.7.0
## Migrating from v0.9.x

The new version of ActionSheet introduces some **breaking changes**. Please read through the [migration guide](https://rnas.vercel.app/guides/migrate) and take the necessary steps.

## Examples

The source code for the example (showcase) app is under the example/ directory. If you want to play with the ActionSheet but don't feel like trying it on a real app, you can run the [example snack](https://snack.expo.dev/@ammarahmed/github.com-ammarahm-ed-react-native-actions-sheet:expo-example).

## Documentation for v0.7.0 & older

You can find the docs in [v0.7.0 branch](https://github.com/ammarahm-ed/react-native-actions-sheet/tree/v0.7.0)

## Consider supporting with a ⭐️ [star on GitHub](https://github.com/ammarahm-ed/react-native-actions-sheet/)

If you are using the library in one of your projects, consider supporting with a star. It takes a lot of time and effort to keep this maintained and address issues and bugs. Thank you.
Expand Down
11 changes: 5 additions & 6 deletions app/components/button.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
import {Text, TextStyle, TouchableOpacity} from 'react-native';
import {TouchableOpacityProps} from 'react-native-gesture-handler';
import { Pressable, PressableProps, StyleProp, Text, TextStyle, ViewStyle } from 'react-native';

export function Button(
props: TouchableOpacityProps & {
props: PressableProps & {
btnTitleStyle?: TextStyle;
title: string;
},
) {
return (
<TouchableOpacity
<Pressable
{...props}
style={[
{
Expand All @@ -27,7 +26,7 @@ export function Button(
width: '100%',
marginBottom: 10,
},
props.style,
props.style as StyleProp<ViewStyle>,
]}>
<Text
style={[
Expand All @@ -39,6 +38,6 @@ export function Button(
]}>
{props.title}
</Text>
</TouchableOpacity>
</Pressable>
);
}
6 changes: 3 additions & 3 deletions app/examples/flashlist.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useCallback} from 'react';
import {Text, View} from 'react-native';
import ActionSheet from 'react-native-actions-sheet';
import {FlashList} from 'react-native-actions-sheet/dist/src/views/FlashList';
import ActionSheet, { ScrollView } from 'react-native-actions-sheet';
import {FlashList} from '@shopify/flash-list';

function FlashListSheet() {
const vegetableNamesWithEmoji = [
Expand Down Expand Up @@ -101,7 +101,7 @@ function FlashListSheet() {
}}>
<FlashList
data={vegetableNamesWithEmoji}
estimatedItemSize={40}
renderScrollComponent={ScrollView}
ListHeaderComponent={
<Text
style={{
Expand Down
26 changes: 14 additions & 12 deletions app/examples/scrollview.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, {useCallback} from 'react';
import {Text, View} from 'react-native';
import ActionSheet, {ScrollView} from 'react-native-actions-sheet';
import {TextInput} from 'react-native-gesture-handler';
import {RefreshControl} from 'react-native-gesture-handler';

function ScrollViewSheet() {
const vegetableNamesWithEmoji = [
Expand Down Expand Up @@ -39,34 +39,36 @@ function ScrollViewSheet() {

const renderItem = useCallback(
(item, index) => (
<TextInput
<Text
key={item + index}
style={{
color: 'black',
fontSize: 20,
height: 60,
}}
pointerEvents="none"
placeholderTextColor="#a9a9a9"
placeholder={item}
/>
}}>
{item}
</Text>
),
[],
);

return (
<ActionSheet gestureEnabled containerStyle={{
maxHeight:'100%',
height:'100%'
}}>
<ActionSheet
gestureEnabled
snapPoints={[50, 100]}
initialSnapIndex={0}
containerStyle={{
maxHeight: '100%',
height: '100%',
}}>
<View
style={{
paddingHorizontal: 12,
alignItems: 'center',
paddingTop: 20,
gap: 10,
width: '100%',
height:'100%'
height: '100%',
}}>
<ScrollView
style={{
Expand Down
13 changes: 12 additions & 1 deletion app/examples/snap-me.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { Text, View } from 'react-native';
import ActionSheet, { useSheetRef } from 'react-native-actions-sheet';
import ActionSheet, { SheetManager, useSheetRef } from 'react-native-actions-sheet';
import { Button } from '../components/button';

const SnapMe = () => {
Expand Down Expand Up @@ -43,6 +43,17 @@ const SnapMe = () => {
width: 250,
}}
/>

<Button
title="Close All Opened Sheets"
onPress={() => {
SheetManager.hideAll();
console.log("HIDE ALL");
}}
style={{
width: 250,
}}
/>
</View>
</ActionSheet>
);
Expand Down
1 change: 0 additions & 1 deletion app/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
"esModuleInterop": true,
"paths": {
"react-native-actions-sheet": ["../"],
"react-native-actions-sheet/dist/src/views/FlashList": ["../dist/src/views/FlashList"],
"react-native-safe-area-context": ["../example/node_modules/react-native-safe-area-context"]
}
}
Expand Down
2 changes: 1 addition & 1 deletion example/android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,4 @@ hermesEnabled=true
# Use this property to enable edge-to-edge display support.
# This allows your app to draw behind system bars for an immersive UI.
# Note: Only works with ReactActivity and should not be used with custom Activity.
edgeToEdgeEnabled=false
edgeToEdgeEnabled=true
3 changes: 3 additions & 0 deletions example/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
'react-native-reanimated/plugin',
],
};
Loading