Skip to main content

SheetHandle

Give a sheet a native swipe handle. BottomSheet includes this control automatically.

SheetHandle in a native Kindle example

Usage​

Save this example as apps/Reader/App.js in the starter app.

import React, {useState} from 'react';
import {SheetHandle, Text, View} from 'react-kindle';

export default function App() {
const [dismissed, setDismissed] = useState(false);

return (
<View style={{padding: 24}}>
<SheetHandle direction="down" onSwipeDown={() => setDismissed(true)} />
<Text>{dismissed ? 'Dismiss requested' : 'Swipe down on the handle'}</Text>
</View>
);
}

Props​

PropType / defaultDescription
directionnone (default) / up / downGesture hint.
onSwipeUp / onSwipeDownfunctionGesture callbacks.
accessibilityLabelstringDefaults to the direction hint.
styleView styleContainer layout; default height is 32.