0.1.92 • Published 2 years ago
react-framer-bottom-sheet v0.1.92
react-framer-bottom-sheet
Installation
npm install react-framer-bottom-sheet
or
yarn add react-framer-bottom-sheet
Usage
import FramerBottomSheet from 'react-framer-bottom-sheet';
import { FramerBottomSheetRef } from 'react-framer-bottom-sheet/dist/sheetType';
function App() {
const sheetRef = useRef < FramerBottomSheetRef > null;
const buttonHandler = () => {
sheetRef.current?.snapTo('bottom');
};
return (
<div className="App">
<button onClick={buttonHandler}>to bottom</button>
<FramerBottomSheet
initialPosition="top"
ref={sheetRef}
style={{ backgroundColor: '#FAFAFA' }}
snapPoint={{ top: { height: 400 }, bottom: { height: 100 } }}
bottomScrollLock
headerElement={
<div style={{ height: 50, backgroundColor: 'red' }}>header</div>
}
footerElement={
<div style={{ height: 50, backgroundColor: 'green' }}>footer</div>
}
>
<div style={{ height: 500, backgroundColor: 'blue' }}>Content</div>
</FramerBottomSheet>
</div>
);
}
export default App;
0.1.92
2 years ago
0.1.91
2 years ago
0.1.9
2 years ago
0.1.81
2 years ago
0.1.8
2 years ago
0.1.72
2 years ago
0.1.71
2 years ago
0.1.7
2 years ago
0.1.62
2 years ago
0.1.61
2 years ago
0.1.6
2 years ago
0.1.53
2 years ago
0.1.52
2 years ago
0.1.51
2 years ago
0.1.5
2 years ago
0.1.4
2 years ago
0.1.3
2 years ago
0.1.2
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago